Exemplo n.º 1
0
    epochs=10,
    train_batches_per_epoch=10,
    # ---- sparsity related
    target_final_density=0.2,
    sparse_start=None,
    sparse_end=None,
    on_perc=1.0,
    # ---- optimizer related
    optim_alg="SGD",
    learning_rate=0.1,
    weight_decay=0,
)

# run
tune_config = dict(
    name=os.path.basename(__file__).replace(".py", "") + "_lt",
    num_samples=1,
    local_dir=os.path.expanduser("~/nta/results"),
    checkpoint_freq=0,
    checkpoint_at_end=False,
    resources_per_trial={
        "cpu": 1,
        "gpu": 1
    },
    verbose=0,
)

run_ray(tune_config, exp_config, fix_seed=True)

# 10/31 - ran script, working ok, results as expected
Exemplo n.º 2
0
    hebbian_prune_perc=tune.grid_search([0, 0.1, 0.2, 0.3, 0.4, 0.5]),  # 6
    weight_prune_perc=tune.grid_search([0, 0.1, 0.2, 0.3, 0.4, 0.5]),  # 6
    pruning_es=False,
    pruning_active=True,
    hebbian_grow=tune.grid_search([True, False]),  # 2
    # additional validation
    test_noise=True,
    noise_level=0.15,  # test with more agressive noise
    # debugging
    debug_weights=True,
    debug_sparse=True,
)

# ray configurations
tune_config = dict(
    name=__file__.replace(".py", "") + "_eval2",
    num_samples=1,
    local_dir=os.path.expanduser("~/nta/results"),
    checkpoint_freq=0,
    checkpoint_at_end=False,
    stop={"training_iteration": 30},
    resources_per_trial={
        "cpu": 1,
        "gpu": 1
    },
    loggers=DEFAULT_LOGGERS,
    verbose=1,
)

run_ray(tune_config, base_exp_config)
Exemplo n.º 3
0
    batch_size_test=1024,
    # 1- random search baseline
    learning_rate=tune.sample_from(
        lambda spec: np.random.uniform(0.0001, 0.2)),
    on_perc=tune.sample_from(lambda spec: np.random.uniform(0.1, 1.0)),
    momentum=tune.sample_from(lambda spec: np.random.uniform(0, 1.0)),
    weight_decay=tune.sample_from(lambda spec: np.random.uniform(0, 0.1)),
    # 2- sigopt extra parameters
    # experiment_type="SigOpt",
    # params_space=sigopt_params_space,
    # performance_metric="val_acc"
)

# run
tune_config = dict(
    # name=__file__,
    name="sigopt_test3",
    num_samples=300,
    local_dir=os.path.expanduser("~/nta/results"),
    checkpoint_freq=0,
    checkpoint_at_end=False,
    stop={"training_iteration": 20},
    resources_per_trial={
        "cpu": 0,
        "gpu": 0.2
    },
    verbose=2,
)

run_ray(tune_config, exp_config)