Commit d430f4dd authored by Verena Praher's avatar Verena Praher
Browse files

add more configs to the baseline experiment

parent 8e66a220
......@@ -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(
......
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