add explanation on tuning results

This commit is contained in:
Liqun Shao 2019-06-04 16:42:49 -04:00
Родитель 635eab8cb6
Коммит 9e212bc832
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -397,6 +397,10 @@ def train(config, data_folder, learning_rate=0.0001):
min_val_loss_epoch = monitor_epoch
model_state = model.state_dict()
print(monitor_epoch, min_val_loss_epoch, min_val_loss)
logging.info(
"Monitor epoch: %d Min Validation Epoch: %d Loss : %.3f" % (
monitor_epoch, min_val_loss_epoch, min_val_loss)
)
if monitor_epoch - min_val_loss_epoch > config['training']['stop_patience']:
logging.info("Saving model ...")
# Save the name with validation loss.