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

Weight input mismatch #20

Open
artemkurylev opened this issue Oct 1, 2020 · 1 comment
Open

Weight input mismatch #20

artemkurylev opened this issue Oct 1, 2020 · 1 comment
Labels
question Further information is requested

Comments

@artemkurylev
Copy link

artemkurylev commented Oct 1, 2020

Got this error, while trying to run test_model.py with pretrained weights
RuntimeError: Given groups=1, weight of size [32, 4, 3, 3], expected input[1, 12, 306, 226] to have 4 channels, but got 12 channels instead
Full stack trace

  File "C:/Users/130/Documents/Clofit/Repos/PyNET-PyTorch/test_model.py", line 85, in <module>
    test_model()
  File "C:/Users/130/Documents/Clofit/Repos/PyNET-PyTorch/test_model.py", line 72, in test_model
    enhanced = model(raw_image.detach())
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\parallel\data_parallel.py", line 143, in forward
    return self.module(*inputs, **kwargs)
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "C:\Users\130\Documents\Clofit\Repos\PyNET-PyTorch\model.py", line 222, in forward
    conv_l1_d1 = self.conv_l1_d1(x)
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "C:\Users\130\Documents\Clofit\Repos\PyNET-PyTorch\model.py", line 287, in forward
    out_3 = self.conv_3a(x)
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "C:\Users\130\Documents\Clofit\Repos\PyNET-PyTorch\model.py", line 331, in forward
    out = self.conv2d(out)
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 550, in __call__
    result = self.forward(*input, **kwargs)
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\modules\conv.py", line 349, in forward
    return self._conv_forward(input, self.weight)
  File "C:\Users\130\Anaconda3\lib\site-packages\torch\nn\modules\conv.py", line 346, in _conv_forward
    self.padding, self.dilation, self.groups)```
@ragnariock
Copy link

same !

@aiff22 aiff22 added the question Further information is requested label Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants