浅谈深度学习:如何计算模型以及中间变量的显存占用大小:
https://oldpan.me/archives/how-to-calculate-gpu-memory
如何在Pytorch中精细化利用显存
https://oldpan.me/archives/how-to-use-memory-pytorch
pytorch 减小显存消耗,优化显存使用,避免out of memory
https://blog.youkuaiyun.com/qq_28660035/article/details/80688427