Closed wlj567 closed 1 year ago
I modified it according to the previous modification method, and a new error appears:TypeError: tensor is not a torch image.
I looked at some solutions, changing the location of normalize and ToTensor, but I didn't see ToTensor in the code
Transform.append(T.Resize((int(256aspect_ratio)-int(256aspect_ratio)%16,256))) Transform.append(T.Resize((224, 224))) Transform.append(T.ToTensor()) Transform = T.Compose(Transform)
I can make the program run, but the relevant evaluation index is not high. Thank you for sharing the code.
wlj567 ,你好,可以把你运行成功的代码分享给我吗,万分感谢,邮箱1471268273@qq.com
wlj567 ,你好,可以把你运行成功的代码分享给我吗,万分感谢,邮箱1471268273@qq.com
抱歉我的电脑之前出问题了,文件没有保存。你可以跟着报错来,网上都有解决方法。
好的,再麻烦问下,代码中只说用pytorch架构,未说基于python哪个版本。你还记得你的运行环境吗
------------------ 原始邮件 ------------------ 发件人: "LeeJunHyun/Image_Segmentation" @.>; 发送时间: 2022年3月22日(星期二) 下午3:07 @.>; @.**@.>; 主题: Re: [LeeJunHyun/Image_Segmentation] RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 160 and 384 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:689 (Issue #80)
wlj567 @.***
抱歉我的电脑之前出问题了,文件没有保存。你可以跟着报错来,网上都有解决方法。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
python3.6,pytorch好像用的1.2
非常感谢,能否加一下你得QQ或者微信。我得数据集划分一直跑不通,没有看懂代码。我微信zhf10776 qq 1471268273
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年3月25日(星期五) 上午9:13 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [LeeJunHyun/Image_Segmentation] RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 160 and 384 in dimension 2 at /pytorch/aten/src/TH/generic/THTensor.cpp:689 (Issue #80)
python3.6,pytorch好像用的1.2
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
慢慢看吧,我也不怎么懂,只是调通了而已