Restore gc empty_cache in train_ms_jp
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import argparse
|
||||
import datetime
|
||||
import gc
|
||||
import os
|
||||
import platform
|
||||
|
||||
@@ -1008,9 +1009,9 @@ def train_and_evaluate(
|
||||
)
|
||||
)
|
||||
pbar.update()
|
||||
# 本家ではこれをスピードアップのために消すと書かれていたので、一応消してみる
|
||||
# gc.collect()
|
||||
# torch.cuda.empty_cache()
|
||||
|
||||
gc.collect()
|
||||
torch.cuda.empty_cache()
|
||||
if pbar is None and rank == 0:
|
||||
logger.info(f"====> Epoch: {epoch}, step: {global_step}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user