import gc import torch del model gc.collect() torch.cuda.empty_cache() 最后修改:2022 年 02 月 13 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏