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
Shreyan Chowdhury
moodwalk
Commits
d430f4dd
Commit
d430f4dd
authored
Sep 10, 2019
by
Verena Praher
Browse files
add more configs to the baseline experiment
parent
8e66a220
Changes
1
Hide whitespace changes
Inline
Side-by-side
experiments/experiment_baseline.py
View file @
d430f4dd
...
...
@@ -7,13 +7,28 @@ from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint
import
os
config
=
{
'epochs'
:
1
'epochs'
:
1
,
'patience'
:
50
,
'earlystopping_metric'
:
'val_loss'
,
# 'val_prauc'
'earlystopping_mode'
:
'min'
# 'max'
}
def
epochs_500
():
global
config
config
[
'epochs'
]
=
500
def
epochs_100
():
global
config
config
[
'epochs'
]
=
100
config
[
'patience'
]
=
20
def
epochs_20
():
global
config
config
[
'epochs'
]
=
20
def
run
(
hparams
):
init_experiment
(
comment
=
hparams
.
experiment_name
)
from
utils
import
CURR_RUN_PATH
,
logger
# import these after init_experiment
...
...
@@ -48,10 +63,10 @@ def run(hparams):
# batch_size = 32
early_stop
=
EarlyStopping
(
monitor
=
'val_loss'
,
patience
=
50
,
monitor
=
config
[
'earlystopping_metric'
]
,
patience
=
config
[
'patience'
]
,
verbose
=
True
,
mode
=
'min'
mode
=
config
[
'earlystopping_mode'
]
)
checkpoint_callback
=
ModelCheckpoint
(
...
...
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