文章目录 jupyter notebook中GPU显存释放问题 jupyter notebook中GPU显存释放问题 每次运行完网络GPU显存都不会释放,点击重启太烦了,使用下面语句来释放显存就好。 import torch torch.cuda.empty_cache()