Skip to content

TypeError: not all arguments converted during string formatting #26

@FengJin2023

Description

@FengJin2023

Hello, I was trying to run the demo code, but I kept facing below error.
It seems that the out_channel(feature_num) has some problem.
Do you the reason of it.

/home python demo_test.py --config ./demo_config/demo.yaml

Traceback (most recent call last):
File "demo_test.py", line 206, in
main()
File "demo_test.py", line 177, in main
model = my_model(en_feature_num=args.EN_FEATURE_NUM,
File "/home/imglab3/feng/Research/UHDM/model/nets.py", line 21, in init
self.encoder = Encoder(feature_num=en_feature_num, inter_num=en_inter_num, sam_number=sam_number)
File "/home/imglab3/feng/Research/UHDM/model/nets.py", line 73, in init
nn.Conv2d(12, feature_num, kernel_size=5, stride=1, padding=2, bias=True),
File "/home/michael/feng/anaconda3/envs/esdnet/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 433, in init
super(Conv2d, self).init(
File "/home/michael/feng/anaconda3/envs/esdnet/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 85, in init
if out_channels % groups != 0:
TypeError: not all arguments converted during string formatting

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