This commit is contained in:
Adrian Wälchli 2021-06-09 16:23:23 +02:00
parent 01b72935e9
commit 43a6d1edeb
2 changed files with 6 additions and 0 deletions

View File

@ -990,6 +990,8 @@ class Trainer(
# release memory before running any other hooks
del batch
import gc
gc.collect()
# log batch metrics
self.logger_connector.log_evaluation_step_metrics()
@ -1101,6 +1103,8 @@ class Trainer(
# release memory before running any other hooks
del batch
import gc
gc.collect()
# call hook
results = self.predict_loop.on_predict_epoch_end()

View File

@ -510,6 +510,8 @@ class TrainLoop:
# release memory before running any other hooks
del batch
import gc
gc.collect()
# -----------------------------------------
# SAVE METRICS TO LOGGERS