AI备忘录 - Python - 垃圾回收与显存释放 的评论
type: channel
link: https://www.aiuai.cn/aifarm1971.html
description: import gcimport torchdel modelgc.collect()torch.cuda.empty_cache()