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

TypeError: conv2d() received an invalid combination of arguments #25

Closed
soopark0221 opened this issue Nov 2, 2021 · 1 comment
Closed

Comments

@soopark0221
Copy link

Traceback (most recent call last):
File "/home/sypark/mlvu_project/Non-Local-Sparse-Attention/src/main.py", line 36, in
main()
File "/home/sypark/mlvu_project/Non-Local-Sparse-Attention/src/main.py", line 30, in main
t.train()
File "/home/sypark/mlvu_project/Non-Local-Sparse-Attention/src/trainer.py", line 48, in train
sr = self.model(lr, 0)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/sypark/mlvu_project/Non-Local-Sparse-Attention/src/model/init.py", line 54, in forward
return self.model(x)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/sypark/mlvu_project/Non-Local-Sparse-Attention/src/model/nlsn.py", line 63, in forward
x = self.tail(res)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/container.py", line 141, in forward
input = module(input)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/container.py", line 141, in forward
input = module(input)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 446, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/sypark/anaconda/envs/mlvu_torch/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 442, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
TypeError: conv2d() received an invalid combination of arguments - got (Tensor, Parameter, Parameter, tuple, tuple, tuple, int), but expected one of:

  • (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, tuple of ints padding, tuple of ints dilation, int groups)
    didn't match because some of the arguments have invalid types: (Tensor, !Parameter!, !Parameter!, !tuple!, !tuple!, !tuple!, int)
  • (Tensor input, Tensor weight, Tensor bias, tuple of ints stride, str padding, tuple of ints dilation, int groups)
    didn't match because some of the arguments have invalid types: (Tensor, !Parameter!, !Parameter!, !tuple!, !tuple!, !tuple!, int)

I got this conv2d() invalid combination of arguments issue while training DIV2K dataset. Can you help me with this?:'(

@HarukiYqM
Copy link
Owner

Hi, this is likely due to the PyTorch upgrade. Please try a version lower than 1.9.

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