Running trainmodel on the command line

Basic instructions

Basic instructions on running trainmodel can be gained by looking at the --help menu:

$ trainmodel --help
Using Theano backend.
WARNING (theano.configdefaults): install mkl with `conda install mkl-service`: No module named 'mkl'
usage: trainmodel [-h] [--path-to-trainingset PATH_TO_TRAININGSET]
                  --number-of-classes NUMBER_OF_CLASSES
                  [--trainingset-pickle-file TRAININGSET_PICKLE_FILE]
                  [--model-name MODEL_NAME] [--batch-size BATCH_SIZE]
                  [--nb-epoch NB_EPOCH]
                  [--fraction-validation FRACTION_VALIDATION]
                  [--fraction-testing FRACTION_TESTING]
                  [--randomseed RANDOMSEED] [--verbose]

An examples commandline of how to obtain a model is given below:
THEANO_FLAGS=mode=FAST_RUN,device=cuda,floatX=float32 trainmodel --path-to-
trainingset='somedir' --number-of-classes='somenum'

optional arguments:
  -h, --help            show this help message and exit
  --path-to-trainingset PATH_TO_TRAININGSET
                        folder where labeled images live
  --number-of-classes NUMBER_OF_CLASSES
                        How many classes do you have
  --trainingset-pickle-file TRAININGSET_PICKLE_FILE
                        folder where the entire pickled training set will
                        live. This pickle file should be read in by pandas
  --model-name MODEL_NAME
                        what you would like to model filename to be
  --batch-size BATCH_SIZE
                        defines the batch size, 30 is a reasonable size
  --nb-epoch NB_EPOCH   defines the number of iterations, 130 is reasonable.
                        You can set it to 100 or below, if you have time
                        concern for training.
  --fraction-validation FRACTION_VALIDATION
                        Perentage of trianing set to save for validation
  --fraction-testing FRACTION_TESTING
                        Percentage of training set to save for testing
  --randomseed RANDOMSEED
                        Set random seed
  --verbose             Run in Verbose Mode

Detailed instructions

A few of the command-line options require special formatting, use the reference below for more detailed info.