added log saving when early epoch stop
This commit is contained in:
parent
0637d8e7a5
commit
f881bf6750
|
@ -281,11 +281,11 @@ class Trainer(TrainerIO):
|
||||||
self.__run_validation()
|
self.__run_validation()
|
||||||
|
|
||||||
# when batch should be saved
|
# when batch should be saved
|
||||||
if (batch_nb + 1) % self.log_save_interval == 0:
|
if (batch_nb + 1) % self.log_save_interval == 0 or early_stop_epoch:
|
||||||
self.experiment.save()
|
self.experiment.save()
|
||||||
|
|
||||||
# when metrics should be logged
|
# when metrics should be logged
|
||||||
if batch_nb % self.add_log_row_interval == 0:
|
if batch_nb % self.add_log_row_interval == 0 or early_stop_epoch:
|
||||||
# count items in memory
|
# count items in memory
|
||||||
# nb_params, nb_tensors = count_mem_items()
|
# nb_params, nb_tensors = count_mem_items()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue