Commit 609a4565 authored by Andrei Roibu's avatar Andrei Roibu
Browse files

bug fixes + added number of epochs as a parser variable

parent ff37a962
......@@ -389,8 +389,10 @@ if __name__ == '__main__':
help='run mode, valid values are train or evaluate')
parser.add_argument('--model_name', '-n', required=True,
help='model name, required for identifying the settings file modelName.ini & modelName_eval.ini')
parser.add_argument('--use_last_checkpoint', '-cp', required=False,
parser.add_argument('--use_last_checkpoint', '-c', required=False,
help='flag indicating if the last checkpoint should be used if 1; useful when wanting to time-limit jobs.')
parser.add_argument('--number_of_epochs', '-e', required=False,
help='flag indicating how many epochs the network will train for; should be limited to ~3 hours or 2/3 epochs')
arguments = parser.parse_args()
......@@ -404,8 +406,13 @@ if __name__ == '__main__':
misc_parameters = settings['MISC']
evaluation_parameters = settings['EVALUATION']
if arguments.use_last_checkpoint is not None:
if arguments.use_last_checkpoint == '1':
training_parameters['use_last_checkpoint'] = True
elif arguments.use_last_checkpoint == '0':
training_parameters['use_last_checkpoint'] = False
if arguments.number_of_epochs is not None:
training_parameters['number_of_epochs'] = int(arguments.number_of_epochs)
if arguments.mode == 'train':
train(data_parameters, training_parameters,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment