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

View File

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