HUSTSYJ / DA_dahazing

Domain Adaptation for Image Dehazing, CVPR2020
247 stars 40 forks source link

Given groups=1, weight of size [16, 1, 3, 3], expected input[2, 3, 256, 256] #33

Open Bule7 opened 1 year ago

Bule7 commented 1 year ago

Traceback (most recent call last): File "train.py", line 90, in train(opt, data_loader, model, visualizer) File "train.py", line 33, in train model.optimize_parameters()
File "/root/autodl-tmp/domain-adaptation-and-image-dehazing-on-nighttime-hazy-images/models/SDehazingnet_model.py", line 203, in optimize_parameters self.forward() File "/root/autodl-tmp/domain-adaptation-and-image-dehazing-on-nighttime-hazy-images/models/SDehazingnet_model.py", line 130, in forward self.img_s2r = self.netS2R(self.syn_haze_img, self.depth, True).detach() File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, kwargs) File "/root/autodl-tmp/domain-adaptation-and-image-dehazing-on-nighttime-hazy-images/models/networks.py", line 477, in forward sifted_fea = self.SFT(fea, depth) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, *kwargs) File "/root/autodl-tmp/domain-adaptation-and-image-dehazing-on-nighttime-hazy-images/models/networks.py", line 412, in forward depth_condition = self.condition_conv(depth) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(input, kwargs) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/container.py", line 119, in forward input = module(input) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 399, in forward return self._conv_forward(input, self.weight, self.bias) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 395, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Given groups=1, weight of size [16, 1, 3, 3], expected input[2, 3, 256, 256] to have 1 channels, but got 3 channels instead what's the problem?