YuanXue1993 / SegAN

SegAN: Semantic Segmentation with Adversarial Learning
MIT License
182 stars 58 forks source link

I want to perform segmentation tasks on my own dataset, but there seems to be a problem with the Nets #21

Open didikuangda opened 1 year ago

didikuangda commented 1 year ago

Traceback (most recent call last): File "/home_lv/yingjie.wang/fenge/train3.py", line 20, in from net import NetS, NetC File "/home_lv/yingjie.wang/fenge/net.py", line 488, in summary(model, input_size=(3,160,160)) File "/home_lv/yingjie.wang/anaconda3/envs/pytorch/lib/python3.9/site-packages/torchsummary/torchsummary.py", line 72, in summary model(x) File "/home_lv/yingjie.wang/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(input, kwargs) File "/home_lv/yingjie.wang/fenge/net.py", line 314, in forward decoder4 = self.deconvblock4(decoder3) File "/home_lv/yingjie.wang/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, *kwargs) File "/home_lv/yingjie.wang/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/container.py", line 141, in forward input = module(input) File "/home_lv/yingjie.wang/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1120, in _call_impl result = forward_call(input, kwargs) File "/home_lv/yingjie.wang/fenge/net.py", line 38, in forward x_l = self.conv_l1(x) File "/home_lv/yingjie.wang/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1120, in _call_impl result = forward_call(*input, **kwargs) File "/home_lv/yingjie.wang/anaconda3/envs/pytorch/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_lv/yingjie.wang/anaconda3/envs/pytorch/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:

didikuangda commented 1 year ago

It's about the GlobalConvBlock section. May be related to kernel_size