深度学习填坑记录
qian9905
这个作者很懒,什么都没留下…
展开
-
from PIL import Image 后importError: DLL load failed: 找不到指定的模块
检查运行时环境配置是否符合所需的依赖关系。例如,如果您使用的是 Windows 操作系统,可以从 Microsoft 官方网站下载和安装相关的 Visual Studio 运行时环境。检查您所使用的 Python 版本是否正确。例如,如果您在 Python 3.x 上使用 Pillow,需要安装与您所使用的 Python 版本兼容的 Pillow 库。检查所安装的 Pillow 库与操作系统、Python 版本等兼容。注意不同的操作系统有可能需要额外的配置或者不兼容某些 Pillow 版本。原创 2023-05-19 11:49:49 · 136 阅读 · 0 评论 -
【torch.max】TypeError: expected Tensor as element 1 in argument 0, but got torch.return_types.max
我遇到该报错原因是,torch.max函数返回值包含两个:第一个是max的tensor,第二个是max值的位置index.返回的最大值和索引各是一个tensor,分别表示该维度的最大值,以及该维度最大值的索引,一起构成元组(Tensor, LongTensor)实际上这是一个max返回值认知不清的误区。可以获取最大值索引tensor。可以获取最大值tensor。原创 2022-12-19 18:59:22 · 3097 阅读 · 2 评论 -
RuntimeError: All input tensors must be on the same device.解决方案
在我的代码中我遇到这种情况一般都是在torch.cat的时候。原创 2022-12-16 16:01:18 · 793 阅读 · 0 评论 -
TypeError: empty() received an invalid combination of arguments
TypeError: empty() received an invalid combination of arguments原创 2022-10-20 10:57:03 · 2940 阅读 · 0 评论