added missing paranthesis in if statement. fixed logging of resetting to best eopch after second run

Esse commit está contido em:
Lukas gemein
2018-07-18 14:42:49 +02:00
commit 6a1c9bf588
+2 -2
Ver Arquivo
@@ -199,8 +199,8 @@ class Experiment(object):
self.run_until_second_stop()
# if no valid loss was found below the best train loss on 1st run,
# reset model to the epoch with lowest valid_misclass
if float(self.epochs_df['valid_loss'].iloc[-1] > loss_to_reach:
log.info("Resetting to best epoch {%d}".format(self.rememberer.best_epoch))
if float(self.epochs_df['valid_loss'].iloc[-1]) > loss_to_reach:
log.info("Resetting to best epoch {:d}".format(self.rememberer.best_epoch))
self.rememberer.reset_to_best_model(self.epochs_df, self.model,
self.optimizer)