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