Skip to content
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

Test #60

Open
01SHENyankun opened this issue Nov 19, 2021 · 19 comments
Open

Test #60

01SHENyankun opened this issue Nov 19, 2021 · 19 comments

Comments

@01SHENyankun
Copy link

I have finished training, but I have encountered problems during the test. I would like to ask what to input at the terminal for test.

@01SHENyankun
Copy link
Author

I tested it according to the command of readme and got the following results
20211119143933
Then, it is modified according to the above error report, and the following results appear
20211119143959

@jingyuanli001
Copy link
Owner

can you try to make the mask a single channel image?

@01SHENyankun
Copy link
Author

can you try to make the mask a single channel image?

Hello, can you give me a contact information, my qq2635505974

@01SHENyankun
Copy link
Author

I have some questions for you

@su161021
Copy link

Hello, may I ask how this problem was finally solved? I also met the same problem, thank you!

@lgl1227
Copy link

lgl1227 commented Mar 31, 2022

I have the same question. I want to slove this problem.
Traceback (most recent call last):
File "run.py", line 38, in
run()
File "run.py", line 30, in run
model.test(dataloader, args.result_save_path)
File "E:\PycharmProject\RFR-Inpainting\model.py", line 90, in test
fake_B, mask = self.G(masked_images, masks)
File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "E:\PycharmProject\RFR-Inpainting\modules\RFRNet.py", line 146, in forward
x1, m1 = self.Pconv1(in_image, mask)
File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "E:\PycharmProject\RFR-Inpainting\modules\partialconv2d.py", line 55, in forward
self.update_mask = F.conv2d(mask, self.weight_maskUpdater, bias=None, stride=self.stride, padding=self.padding, dilation=self.dilation, groups=1)
RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 9, 256, 256] to have 3 channels, but got 9 channels instead

@lgl1227
Copy link

lgl1227 commented Mar 31, 2022

I understand. Because the bit depth of these mask images is not consistent, some are 8 bits, some are 24 bits

@lgl1227
Copy link

lgl1227 commented Mar 31, 2022

image ×
image

@01SHENyankun
Copy link
Author

图片× 图片

你好,请问您这个代码,你进行测试了嘛,有测试指标嘛

@lgl1227
Copy link

lgl1227 commented Apr 15, 2022 via email

@Jamie-61
Copy link

你好,请问你这个问题解决了嘛
Uploading image.png…
我遇到了同样的问题,可不可以请教一下

@lgl1227
Copy link

lgl1227 commented Apr 20, 2022

不好意思,你的图片看不到

@Jamie-61
Copy link

/home/qsh/anaconda3/bin/python3.7 /home/qsh/ccc/RFR-Inpainting-master/run.py
Model moved to cuda

测试代码中mask只能是外部加载的mask数据集吗(mask_mode只能为2吗),如果mask_mode使用0或1,就会出现上述错误

@lgl1227
Copy link

lgl1227 commented Apr 20, 2022

我的理解是mask_mode的0或者1模式 不是用于测试的吧。

@Jamie-61
Copy link

嗯嗯!谢谢啦!

@R1ckLou
Copy link

R1ckLou commented Apr 24, 2022

I have the same question. I want to slove this problem. Traceback (most recent call last): File "run.py", line 38, in run() File "run.py", line 30, in run model.test(dataloader, args.result_save_path) File "E:\PycharmProject\RFR-Inpainting\model.py", line 90, in test fake_B, mask = self.G(masked_images, masks) File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "E:\PycharmProject\RFR-Inpainting\modules\RFRNet.py", line 146, in forward x1, m1 = self.Pconv1(in_image, mask) File "E:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "E:\PycharmProject\RFR-Inpainting\modules\partialconv2d.py", line 55, in forward self.update_mask = F.conv2d(mask, self.weight_maskUpdater, bias=None, stride=self.stride, padding=self.padding, dilation=self.dilation, groups=1) RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 9, 256, 256] to have 3 channels, but got 9 channels instead

我也是遇到这个问题,请问怎么解决? 我的mask图片位深度都是相同的8

@youarenotaloneor
Copy link

RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[1, 9, 256, 256] to have 3 channels, but got 9 channels instead
@jingyuanli001 :I have the above errors in the test. How can I solve them?

@xiaoyanghuha
Copy link

It is necessary to use a mask image with a bit depth of 1. I successfully solved this problem and tested the results,If you also want to solve this problem, please contact me “xiaoyanghuha@163.com

@xiximelon
Copy link

comment this line!
# masks = torch.cat([masks]*3, dim = 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants