Commit 7b483138 authored by Jean Ibarz's avatar Jean Ibarz
Browse files

Added tensorboard to requirements, and added journalization of LOSS when...

Added tensorboard to requirements, and added journalization of LOSS when training a model. Updated default experiment configuration.
parent 6d78a0af
......@@ -8,7 +8,7 @@ from core.logger import Logger
from core.model import model_factory
import pandas as pd
from core.metrics import MeanAbsoluteAzimuthError
import os
#set GPUs if any
from core.utils import set_gpus
......@@ -24,10 +24,10 @@ ALL_SUBJECTS_EXCEPT_1059 = list(range(1002, 1010)) + list(range(1012, 1019)) + l
RESULTS_ROOTDIR = '../tf_results'
exp_config = ExperimentConfiguration({'n_augment': 1,
'n_epochs': 20,
'n_iters': 20,
'n_epochs': 500,
'n_iters': 1,
'batch_size': 512,
'learning_rate': 0.0005,
'learning_rate': 0.0001,
'model_name': 'one_sided',
# possible values: {'default', 'left_center_right', 'one_sided'}
'model_config': {
......@@ -147,6 +147,11 @@ if __name__ == '__main__':
# create and train the model
model = model_factory(model_name=exp_config['model_name'], model_config=exp_config['model_config'])
# journalization of scalar metrics with tensorboard
tensorboard_scalars_out_dir = os.path.join(RESULTS_ROOTDIR, logdir_prefix, 'tensorboard_scalars')
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=tensorboard_scalars_out_dir)
# model optimizer
opt = tf.keras.optimizers.RMSprop(learning_rate=exp_config['learning_rate'])
if exp_config['model_name'] in ['default', 'one_sided']:
......
Supports Markdown
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