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

TypeError: __init__() got an unexpected keyword argument 'ape' #96

Open
misswayguy opened this issue Nov 1, 2024 · 0 comments
Open

Comments

@misswayguy
Copy link

I tried to use Swin transformer segmentation but encountered this problem. How can I solve it?

Traceback (most recent call last):
File "/home/lusiyuan/ZZQ/Swin-Transformer-Semantic-Segmentation-main/demo/image_demo.py", line 57, in
main()
File "/home/lusiyuan/ZZQ/Swin-Transformer-Semantic-Segmentation-main/demo/image_demo.py", line 48, in main
model = init_model(args.config, args.checkpoint, device=args.device)
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmseg/apis/inference.py", line 58, in init_model
model = MODELS.build(config.model)
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmseg/models/segmentors/encoder_decoder.py", line 89, in init
self.backbone = MODELS.build(backbone)
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/home/lusiyuan/.conda/envs/pyt3.9/lib/python3.9/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
TypeError: init() got an unexpected keyword argument 'ape'

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