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

RuntimeError: Given groups=1, weight of size [16, 3, 3, 3], expected input[1, 4, 343, 514] to have 3 channels, but got 4 channels instead #23

Closed
ZarrarAhmedKhan opened this issue Dec 14, 2021 · 1 comment

Comments

@ZarrarAhmedKhan
Copy link

Traceback (most recent call last):
File "main.py", line 352, in
main()
File "main.py", line 128, in main
inference_evaluator.evaluate(net, epoch=0)
File "/content/drive/MyDrive/new_feature/CURL/metric.py", line 79, in evaluate
net_output_img_example ,_= net(img)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/new_feature/CURL/model.py", line 543, in forward
feat = self.tednet(img)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/new_feature/CURL/rgb_ted.py", line 299, in forward
output_img= self.ted(img.float())
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/new_feature/CURL/rgb_ted.py", line 99, in forward
conv1 = self.dconv_down1(x)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/new_feature/CURL/rgb_ted.py", line 189, in forward
x = self.lrelu(self.conv1(self.refpad(x_in)))
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 446, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 443, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [16, 3, 3, 3], expected input[1, 4, 343, 514] to have 3 channels, but got 4 channels instead

@sjmoran
Copy link
Owner

sjmoran commented Dec 14, 2021

See resolution here: sjmoran/DeepLPF#16

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

2 participants