Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrei-Claudiu Roibu
BrainMapper
Commits
609a4565
Commit
609a4565
authored
Aug 07, 2020
by
Andrei Roibu
Browse files
bug fixes + added number of epochs as a parser variable
parent
ff37a962
Changes
1
Hide whitespace changes
Inline
Side-by-side
run.py
View file @
609a4565
...
...
@@ -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'
,
'-c
p
'
,
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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment