sjmoran / CURL

Code for the ICPR 2020 paper: "CURL: Neural Curve Layers for Image Enhancement"
205 stars 34 forks source link

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 closed 2 years ago

ZarrarAhmedKhan commented 2 years ago

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_imgexample ,= 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 commented 2 years ago

See resolution here: https://github.com/sjmoran/DeepLPF/issues/16