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

main.py can't run #6

Open
ljc1231 opened this issue Dec 7, 2021 · 0 comments
Open

main.py can't run #6

ljc1231 opened this issue Dec 7, 2021 · 0 comments

Comments

@ljc1231
Copy link

ljc1231 commented Dec 7, 2021

Traceback (most recent call last):
File "main.py", line 470, in
main(args)
File "main.py", line 305, in main
model = Test_Model[args.id](args, args.num_input, args.num_classes)
File "/home/SA/ljc/ca/CA-Net-master/Models/networks/network.py", line 28, in init
self.conv1 = conv_block(self.in_channels, filters[0])
File "/home/SA/ljc/ca/CA-Net-master/Models/layers/modules.py", line 21, in init
nn.Conv2d(ch_in, ch_out, kernel_size=3, stride=1, padding=1, bias=True),
File "/home/SA/anaconda3/envs/ljctorchpy3.6/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 332, in init
False, _pair(0), groups, bias, padding_mode)
File "/home/SA/anaconda3/envs/ljctorchpy3.6/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 22, in init
if in_channels % groups != 0:
TypeError: unsupported operand type(s) for %: 'Namespace' and 'int'
i have tried a lot versions pytorch,1.4.0/1.7.0/1.10.0, but don't work
do you konw how to fix it, thx!

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

1 participant