https://www.zhihu.com/question/303070254/answer/573037166 这个trick还是挺牛逼的。pytorch中使用opt.zero_step()可以进行很多骚操作,比如使用梯度叠加实现低显存处理大数据。