def get_solver(param):
    solver = SolverParameter()
    solver.net = param["file_train_val_net"]
    solver.test_interval = param["solver_test_interval"]
    solver.base_lr = param["solver_base_lr"]
    solver.weight_decay = param["solver_weight_decay"]
    solver.lr_policy = param["solver_lr_policy"]
    solver.display = param["solver_display"]
    solver.max_iter = param["solver_max_iter"]
    solver.clip_gradients = param["solver_clip_gradients"]
    solver.snapshot = param["solver_snapshot"]
    solver.lr_policy = param["solver_lr_policy"]
    solver.stepsize = param["solver_stepsize"]
    solver.gamma = param["solver_gamma"]
    solver.snapshot_prefix = param["solver_snapshot_prefix"]
    solver.random_seed = param["solver_random_seed"]
    solver.solver_mode = param["solver_solver_mode"]
    solver.test_iter.append(param["solver_test_iter"])
    return solver
Example #2
0
def get_solver(param):
    solver = SolverParameter()
    solver.net = param['file_train_val_net']
    solver.test_interval = param['solver_test_interval']
    solver.base_lr = param['solver_base_lr']
    solver.weight_decay = param['solver_weight_decay']
    solver.lr_policy = param['solver_lr_policy']
    solver.display = param['solver_display']
    solver.max_iter = param['solver_max_iter']
    solver.clip_gradients = param['solver_clip_gradients']
    solver.snapshot = param['solver_snapshot']
    solver.lr_policy = param['solver_lr_policy']
    solver.stepsize = param['solver_stepsize']
    solver.gamma = param['solver_gamma']
    solver.snapshot_prefix = param['solver_snapshot_prefix']
    solver.random_seed = param['solver_random_seed']
    solver.solver_mode = param['solver_solver_mode']
    solver.test_iter.append(param['solver_test_iter'])
    return solver
Example #3
0
def get_solver(param):
    solver = SolverParameter()
    solver.net = param['file_train_val_net']
    solver.test_interval = param['solver_test_interval']
    solver.base_lr = param['solver_base_lr']
    solver.weight_decay = param['solver_weight_decay']
    solver.lr_policy = param['solver_lr_policy']
    solver.display = param['solver_display']
    solver.max_iter = param['solver_max_iter']
    solver.clip_gradients = param['solver_clip_gradients']
    solver.snapshot = param['solver_snapshot']
    solver.lr_policy = param['solver_lr_policy']
    solver.stepsize = param['solver_stepsize']
    solver.gamma = param['solver_gamma']
    solver.snapshot_prefix = param['solver_snapshot_prefix']
    solver.random_seed = param['solver_random_seed']
    solver.solver_mode = param['solver_solver_mode']
    solver.test_iter.append(param['solver_test_iter'])
    return solver
    def get_solver(self, param):
        solver = SolverParameter()
        solver.net = param['base_dir'] + param['net_name'] + "/net.prototxt"

        solver.base_lr = 0.01
        solver.weight_decay = 0.0005
        solver.lr_policy = "poly"
        solver.power = 1
        solver.momentum = 0.9
        solver.type = "SGD"
        solver.clip_gradients = 10

        solver.display = 100
        solver.max_iter = param['max_iter']
        solver.average_loss = 100
        solver.snapshot = param['solver_snapshot_interval']
        solver.snapshot_prefix = param['snapshot_dir'] + param[
            'net_name'] + "/lstm"
        solver.snapshot_format = solver.HDF5
        solver.random_seed = param['random_seed']
        solver.iter_size = 1
        solver.layer_wise_reduce = False
        return solver