Resolve an error on Pytorch 1.13.1 and Pytorch 2.0.
`
Traceback (most recent call last):
File "/Users/zhangchao/Downloads/CADDM-master/backbones/caddm.py", line 61, in
o = model(x)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, kwargs)
File "/Users/zhangchao/Downloads/CADDM-master/backbones/caddm.py", line 47, in forward
loc, cof, adm_final_feat = self.adm(x)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, *kwargs)
File "/Users/zhangchao/Downloads/CADDM-master/backbones/adm.py", line 193, in forward
location, confidence = self.multi_scale_detection_module(adm_feats)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/Users/zhangchao/Downloads/CADDM-master/backbones/adm.py", line 123, in forward
location.append(detector(feat).permute(0, 2, 3, 1).contiguous())
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 459, 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 of (int, int), tuple of (bool, bool), tuple of (int, int), 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 of (int, int), tuple of (bool, bool), tuple of (int, int), int)
`
Resolve an error on Pytorch 1.13.1 and Pytorch 2.0.
` Traceback (most recent call last): File "/Users/zhangchao/Downloads/CADDM-master/backbones/caddm.py", line 61, in
o = model(x)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, kwargs)
File "/Users/zhangchao/Downloads/CADDM-master/backbones/caddm.py", line 47, in forward
loc, cof, adm_final_feat = self.adm(x)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, *kwargs)
File "/Users/zhangchao/Downloads/CADDM-master/backbones/adm.py", line 193, in forward
location, confidence = self.multi_scale_detection_module(adm_feats)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(args, kwargs)
File "/Users/zhangchao/Downloads/CADDM-master/backbones/adm.py", line 123, in forward
location.append(detector(feat).permute(0, 2, 3, 1).contiguous())
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/Users/zhangchao/opt/miniconda3/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 459, 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: