RuntimeError: CUDA out of memory. Tried to allocate 128.00 MiB
模型训练开始出现报错如下:RuntimeError: CUDA out of memory. Tried to allocate 128.00 MiB (GPU 0; 10.92 GiB total capacity;解决办法:由于是直接导入训练好的模型,不需要再次进行反向传播。因此在进行前向传播之前加入或者在出现错误的地方加上:with torch.no_grad():即可解决。即with torch.no_grad(): res = net.forward_pred(input