Skip to content

main.py can't run #6

@ljc1231

Description

@ljc1231

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions