Open zhou-rui1 opened 3 years ago
当我这样设置参数--img_size 1080 --attention_gan 3 --attention_input有上述错误,想问是哪里错了呢
attention先别试用这个功能,这个功能当前还在优化中...
还有,提问时给的信息约详细(报错位置等等),越可能得到解答 :)
是这个,想问这个是什么意思呢
File "enhanced-UGATIT-main/networks.py", line 129, in forward x_ = self.FC(x.view(x.shape[0], -1))
img size为默认或者其他都不行,完整的报错是这样的
training start ! Traceback (most recent call last): File "main.py", line 206, in <module> main() File "main.py", line 193, in main gan.train() File "enhanced-UGATIT-main/UGATIT.py", line 552, in train fake_B2B, fake_B2B_cam_logit, _, _) = self.forward(real_A, real_B) File "enhanced-UGATIT-main/UGATIT.py", line 266, in forward fake_A2B, fake_A2B_cam_logit, fake_A2B_heatmap, fake_A2B_attention = self.genA2B(real_A) File "miniconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "enhanced-UGATIT-main/networks.py", line 129, in forward x_ = self.FC(x.view(x.shape[0], -1)) File "miniconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "miniconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/container.py", line 139, in forward input = module(input) File "miniconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, **kwargs) File "miniconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 96, in forward return F.linear(input, self.weight, self.bias) File "miniconda3/envs/py37/lib/python3.7/site-packages/torch/nn/functional.py", line 1847, in linear return torch._C._nn.linear(input, weight, bias) RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x29163520 and 16777216x256)
刚试了下官方的那版可以,我再看看哪里不同
当我这样设置参数--img_size 1080 --attention_gan 3 --attention_input有上述错误,想问是哪里错了呢