train.py
def write_solver_file(solver_file, train_model, test_models, type, base_lr, momentum, weight_decay,
                      lr_policy, gamma, power, random_seed, max_iter, clip_gradients, snapshot_prefix,display=0):
    '''Writes a solver prototxt file with parameters set to the
    corresponding argument values. In particular, the train_net
    parameter is set to train_model, and a test_net parameter is
    added for each of test_models, which should be a list.'''
    param = SolverParameter()
    param.train_net = train_model
    for test_model in test_models:
        param.test_net.append(test_model)
        param.test_iter.append(0) #don't test automatically
    param.test_interval = max_iter
    param.type = type
    param.base_lr = base_lr
    param.momentum = momentum
    param.weight_decay = weight_decay
    param.lr_policy = lr_policy
    param.gamma = gamma
    param.power = power
    param.display = display #don't print solver iterations unless requested
    param.random_seed = random_seed
    param.max_iter = max_iter
    if clip_gradients > 0:
        param.clip_gradients = clip_gradients
    param.snapshot_prefix = snapshot_prefix
    print("WRITING",solver_file)
    with open(solver_file,'w') as f:
        f.write(str(param))
Writes a solver prototxt file with parameters set to the
    corresponding argument values. In particular, the train_net
    parameter is set to train_model, and a test_net parameter is
    added for each of test_models, which should be a list.
Writes a solver prototxt file with parameters set to the
corresponding argument values. In particular, the train_net
parameter is set to train_model, and a test_net parameter is
added for each of test_models, which should be a list.
Writes a solver prototxt file with parameters set to the corresponding argument values . In particular the train_net parameter is set to train_model and a test_net parameter is added for each of test_models which should be a list .
def write_solver_file(solver_file, train_model, test_models, type, base_lr, momentum, weight_decay,
                      lr_policy, gamma, power, random_seed, max_iter, clip_gradients, snapshot_prefix,display=0):
    param = SolverParameter()
    param.train_net = train_model
    for test_model in test_models:
        param.test_net.append(test_model)
        param.test_iter.append(0) 
    param.test_interval = max_iter
    param.type = type
    param.base_lr = base_lr
    param.momentum = momentum
    param.weight_decay = weight_decay
    param.lr_policy = lr_policy
    param.gamma = gamma
    param.power = power
    param.display = display 
    param.random_seed = random_seed
    param.max_iter = max_iter
    if clip_gradients > 0:
        param.clip_gradients = clip_gradients
    param.snapshot_prefix = snapshot_prefix
    print("WRITING",solver_file)
    with open(solver_file,'w') as f:
        f.write(str(param))
def write_solver_file ( solver_file , train_model , test_models , type , base_lr , momentum , weight_decay , lr_policy , gamma , power , random_seed , max_iter , clip_gradients , snapshot_prefix , display = 0 ) : param = SolverParameter ( ) param . train_net = train_model for test_model in test_models : param . test_net . append ( test_model ) param . test_iter . append ( 0 ) param . test_interval = max_iter param . type = type param . base_lr = base_lr param . momentum = momentum param . weight_decay = weight_decay param . lr_policy = lr_policy param . gamma = gamma param . power = power param . display = display param . random_seed = random_seed param . max_iter = max_iter if clip_gradients > 0 : param . clip_gradients = clip_gradients param . snapshot_prefix = snapshot_prefix print ( "WRITING" , solver_file ) with open ( solver_file , 'w' ) as f : f . write ( str ( param ) )
Writes a solver prototxt file with parameters set to the
corresponding argument values.
Writes a solver prototxt file with parameters set to the corresponding argument values .
'''Writes a solver prototxt file with parameters set to the
    corresponding argument values. In particular, the train_net
    parameter is set to train_model, and a test_net parameter is
    added for each of test_models, which should be a list.''' #don't test automatically #don't print solver iterations unless requested
solver_file
train_model
test_models
type
base_lr
momentum
weight_decay
lr_policy
gamma
power
random_seed
max_iter
clip_gradients
snapshot_prefix
display