-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dataset.py文件中测试函数名称不对 #3
Comments
但是我改了还是报错NameError: name 'patch_size' is not defined,我猜应该是数据集test文件下的图片的问题,有些是321481的,有些是481321的。。。 |
class TestDataset(Dataset):
很抱歉提供了错误的修改方式,我又重新改了一次 |
刚才我自己跑的时候报错之后就把patch_size = self.patch_size了,但是还是出现了 |
我也是刚刚运行的时候发现了这个问题,他使用的inf_batch是训练用的函数所以有O(有雨图)和B(去雨图),测试因为是测试图,所以没有B,所以这个地方报错了,我在试图更改。。。改完回复你 |
Please replace TrainValDataset with TestDataset in main.py when you run testing. |
楼主,你最终把这个论文的代码跑通了吗?我怎么总感觉有问题,看到了望尽快回复,谢谢 |
@SherlockSunset 我发现他的测试代码有问题,所以只跑了show.py 和train.py 最后效果出来一张测试图片有4张输出图片,可能是因为我只训练了4800多步所以实际效果并不怎么好,只去掉了大部分的雨 |
think you |
为什么我跑不了4800步,这个步数不是和训练图片多少有关的么?700张图片我只能跑600多步 |
This problem lies on the usage of iter, and I have fixed all the problems. |
I fix this problem today, please refer to the latest commit |
thank you so much.
陈朋飞 浙江大学生物医学工程与仪器科学学院
原始邮件
发件人:XiaLiPKUnotifications@github.com
收件人:XiaLiPKU/RESCANRESCAN@noreply.github.com
抄送:Kchenchen_gs@zju.edu.cn; Commentcomment@noreply.github.com
发送时间:2018年10月26日(周五) 00:26
主题:Re: [XiaLiPKU/RESCAN] dataset.py文件中测试函数名称不对 (#3)
Closed #3.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
大概在142行
还有就是关于执行python main.py -a test 的时候报错
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 481 and 321 in dimension 2
后来发现运行dataset.py文件显示的测试数据集大小为(3,64,64) 训练数据集大小为(3,481,321)(ps:测试图像是我自己选的)在这里给大家说一下。。。。
解决方法是在第99行sample{‘O’:O}前一行加上
O=cv2.resize(O,(patch_size,patch_size))
就可以了
The text was updated successfully, but these errors were encountered: