Run SGD

Run SGD on a DeepOBS test problem.

usage: deepobs_run_sgd.py [-h] [--data_dir DATA_DIR] --bs BS [--wd WD] --lr LR
                          [--lr_sched_epochs LR_SCHED_EPOCHS [LR_SCHED_EPOCHS ...]]
                          [--lr_sched_factors LR_SCHED_FACTORS [LR_SCHED_FACTORS ...]]
                          -N NUM_EPOCHS [-C CHECKPOINT_EPOCHS]
                          [-r RANDOM_SEED] [--nologs]
                          [--train_log_interval TRAIN_LOG_INTERVAL]
                          [--print_train_iter] [--saveto SAVETO] [--pickle]
                          [--no_time] [--run_name RUN_NAME]
                          test_problem

Positional Arguments

test_problem Name of the test_problem (e.g. 'cifar10.cifar10_3c3d'

Named Arguments

--data_dir Path to the base data dir. If not set, DeepOBS uses its default.
--bs, --batch_size
 The batch size (positive integer).
--wd, --weight_decay
 Factor used for the weight_deacy. If non given, the default weight decay for this model is used. Note, not all models have weight decay, and this value will be ignored in this case.
--lr Initial learning rate (positive float) to use. To set a learning rate schedule, use '--lr_sched_epochs' and '--lr_sched_values' additionally.
--lr_sched_epochs
 One or more epoch numbers (positive integers) that mark learning rate changes, e.g., '--lr_sched_epochs 2 4 5' to change the learning rate after 2, 4 and 5 epochs. The corresponding factors of each change have to be passed via '--lr_sched_factors'.
--lr_sched_factors
 Learning rate factors relative to the initial learning rate at the epochs defined with --lr_sched_epochs, e.g. '--lr_sched_factors= 0.1 0.01 0.001' would reduce the initial learning rate at the defined epochs by a factor of ten.
-N, --num_epochs
 Total number of training epochs.
-C, --checkpoint_epochs
 

Interval of training epochs at which to evaluate on the test set and on a larger chunk of the training set.

Default: 1

-r, --random_seed
 

An integer to set as tensorflow's random seed.

Default: 42

--nologs

Add this flag to switch off tensorflow logging.

Default: False

--train_log_interval
 

The interval of iterations at which the mini-batch training loss is logged. Set to 1 to log every training step. Default is 10.

Default: 10

--print_train_iter
 

Add this flag to print training loss to stdout at each logged training step.

Default: False

--saveto

Folder for saving the results file and the tensorboard logs. If not specified, defaults to 'results'. Within that directory, results and logs will be saved to a subdirectory named after the test problem. Directories will be created if they do not already exist.

Default: "results"

--pickle

Add this flag to switch on logging in a pickle file.

Default: False

--no_time

Add this flag to switch off timing. Otherwise, the script will report the number of iterations necessary to reach the predefined convergence performance (test accuracy) on the given problem.

Default: False

--run_name

Give the run a name describing it. This name will be added to the automatically created name.

Default: ""