Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mat1 and mat2 shapes cannot be multiplied (1x1409024 and 1048576x256) #3

Open
zhou-rui1 opened this issue Oct 12, 2021 · 3 comments
Open

Comments

@zhou-rui1
Copy link

当我这样设置参数--img_size 1080 --attention_gan 3 --attention_input有上述错误,想问是哪里错了呢

@zheng-yuwei
Copy link
Owner

当我这样设置参数--img_size 1080 --attention_gan 3 --attention_input有上述错误,想问是哪里错了呢

attention先别试用这个功能,这个功能当前还在优化中...

还有,提问时给的信息约详细(报错位置等等),越可能得到解答 :)

@zhou-rui1
Copy link
Author

zhou-rui1 commented Oct 13, 2021

是这个,想问这个是什么意思呢
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)

@zhou-rui1
Copy link
Author

刚试了下官方的那版可以,我再看看哪里不同

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants