TypeError: conv2d() received an invalid combination of arguments
使用pytorch构建ResNet18网络模型时出现以下错误解决后具体原因可以参考https://discuss.pytorch.org/t/whats-the-difference-between-nn-relu-vs-f-relu/27599
使用pytorch构建ResNet18网络模型时出现以下错误
TypeError: conv2d() received an invalid combination of arguments - got (ReLU, 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: (ReLU, 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: (ReLU, Parameter, Parameter, tuple, tuple, tuple, int)
具体情况如下
解决后
具体原因可以参考
https://discuss.pytorch.org/t/whats-the-difference-between-nn-relu-vs-f-relu/27599
更多推荐
所有评论(0)