
pytorch
文章平均质量分 51
招坑体质Yoomi~
这个作者很懒,什么都没留下…
展开
-
Pytorch问题:ModuleNotFoundError: No module named ‘torchnet‘ , ‘pip._internal‘已解决
bug1:ModuleNotFoundError: No module named 'pip._internal'出错提示:File "D:\app\anaconda\envs\pytorch_gpu\Scripts\pip.exe\__main__.py", line 4, in <module>ModuleNotFoundError: No module named 'pip._internal'解决: 找到提示的路径(D:\app\anaconda\env...原创 2021-05-27 18:29:42 · 2697 阅读 · 0 评论 -
image caption 代码遇到的各种坑
总有一些坑,需要填★ python json.dump中文乱码问题 with open(os.path.join(file, 'vocab.json'), 'w') as f: json.dump(vocab, f)修改: with open(os.path.join(file, 'vocab.json'), 'w', encoding='utf-8') as f: json.dump(vocab, f,ensure_ascii=False)原创 2021-05-14 21:32:51 · 325 阅读 · 0 评论 -
Pytorch问题---The size of tensor a (4) must match the size of tensor b (3) at non-singletonThe size of
报错:RuntimeError:The size of tensor a (4) must match the size of tensor b (3) at non-singleton解决:img = Image.open(image_path)改为img = Image.open(image_path).convert('RGB')。完成~原创 2021-02-25 07:41:21 · 9820 阅读 · 5 评论