![](https://img-blog.csdnimg.cn/20190918140053667.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
情感识别项目运行问题异常处理总览
代码异常处理
独创之上
这个作者很懒,什么都没留下…
展开
-
pytroch运行报错
介绍:pytroch运行报错一、RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu')to map your storages to the CPU.原创 2021-10-15 11:40:35 · 1077 阅读 · 0 评论 -
pytroch运行时出现:CUDA error:out of memory
一、验证集评估阶段的张量计算非常占用空间。法1. 可以对利用torch.tensor().detach().cpu().numpy()转为numpy,在cpu上进行loss和acc的计算法2. 直接对评估阶段使用with torch.no_grad():转载 2021-10-13 15:48:57 · 176 阅读 · 0 评论