input_sparsity = 0.1
w_sparsity = 0.1
input_scaling = 0.5
n_test = 20
n_samples = 5000
leaky_rate = 0.1
reservoir_size = 400

# Argument
args = tools.functions.argument_parser_training_model()

# Transformer
if args.lang == 'en' or args.lang == 'fr':
    transformer = transforms.Compose([
        # transforms.RemoveLines(),
        transforms.GloveVector(
            model=tools.settings.lang_models[socket.gethostname()][args.lang])
    ])
else:
    transformer = transforms.Compose([
        # transforms.RemoveLines(),
        transforms.Token(model=tools.settings.lang_spacy_models[args.lang],
                         lang=tools.settings.lang_models_lang[args.lang]),
        transforms.GensimModel(model_path=tools.settings.lang_models[
            socket.gethostname()][args.lang])
    ])
# end if

# Samples average
samples_average = np.array([])
best_acc = 0
best_model = None
    args.description,
    args.get_space(),
    args.n_samples,
    args.k,
    verbose=args.verbose
)

# CNN Glove Feature Selector
cgfs = models.cgfs(pretrained=True, n_gram=2, n_features=60)

# Remove last linear layer
cgfs.linear2 = echotorch.nn.Identity()

# Transformer
transformer = transforms.Compose([
    transforms.GloveVector(),
    transforms.ToNGram(n=2, overlapse=True),
    transforms.Reshape((-1, 1, 2, 300)),
    transforms.FeatureSelector(cgfs, 60, to_variable=True),
    transforms.Reshape((1, -1, 60)),
    transforms.Normalize(mean=-4.56512329954, std=0.911449706065)
])

# Reuters C50 dataset
reutersloader = torch.utils.data.DataLoader(datasets.ReutersC50Dataset(
    root=args.dataset,
    download=True,
    n_authors=args.n_authors,
    transform=transformer),
                                            batch_size=1,
                                            shuffle=False)
# Experiment settings
spectral_radius = 0.95
input_sparsity = 0.1
w_sparsity = 0.1
input_scaling = 0.5
n_test = 20
n_samples = 30
leaky_rate = 0.1

# Argument
args = tools.functions.argument_parser_training_model()

# Transformer
transformer = transforms.Compose([
    transforms.RemoveLines(),
    transforms.GloveVector(model=tools.settings.lang_models[args.lang])
])

# Results
parameter_averages = np.zeros(n_test)
parameter_max = np.zeros(n_test)

# For each leaky rate values
index = 0
for rc_reservoir_size in np.linspace(200, 1000, n_test):
    # Round
    reservoir_size = int(math.floor(rc_reservoir_size))

    # Log
    print(u"Reservoir size : {}".format(reservoir_size))