SwinTransformer / Swin-Transformer-Semantic-Segmentation

This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" on Semantic Segmentation.
https://arxiv.org/abs/2103.14030
Apache License 2.0
1.16k stars 223 forks source link

embed_dim error #40

Open durianer-D opened 3 years ago

durianer-D commented 3 years ago

Excuse me, I have the following problem when running your model:

TypeError: EncoderDecoder: SwinTransformer: init() got an unexpected keyword argument 'embed_dim'

The command I use is : python tools/train.py configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k.py

I hope I can get your help

viyjy commented 3 years ago

The same problem

viyjy commented 3 years ago

Excuse me, I have the following problem when running your model:

TypeError: EncoderDecoder: SwinTransformer: init() got an unexpected keyword argument 'embed_dim'

The command I use is : python tools/train.py configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k.py

I hope I can get your help

Hi, I met the same problem with tools/train.py. I changed to use multiple-GPU training tools/dist_train.sh, then it works without this error.

durianer-D commented 3 years ago

Excuse me, I have the following problem when running your model: TypeError: EncoderDecoder: SwinTransformer: init() got an unexpected keyword argument 'embed_dim' The command I use is : python tools/train.py configs/swin/upernet_swin_tiny_patch4_window7_512x512_160k_ade20k.py I hope I can get your help

Hi, I met the same problem with tools/train.py. I changed to use multiple-GPU training tools/dist_train.sh, then it works without this error.

Thanks for your answer!But I only have one GPU.

orilifs commented 3 years ago

Happened to me also :)

xuhao-anhe commented 2 years ago

Has anyone solved the problem

chandler-25 commented 2 years ago

OMG, is there anyone solve this problem

JungmoKoo commented 2 years ago

You should use the mmseg lib in this repo. I guess you are using the global mmseg lib. and also I installed mmcv-full==1.3.0 version.

ChouCHou-y commented 2 years ago

I only have one GPU.Has anyone solved the problem? i need help

JungmoKoo commented 2 years ago

I only have one GPU.Has anyone solved the problem? i need help

@ChouCHou-y Did you try my solution? (https://github.com/SwinTransformer/Swin-Transformer-Semantic-Segmentation/issues/40#issuecomment-976982507)

ChouCHou-y commented 2 years ago

Sorry. If I installed mmcv-full==1.3.0 version,it also the following error,and to this day I have not found the key factors that contributed to it. TypeError: EncoderDecoder: SwinTransformer: init() got an unexpected keyword argument 'embed_dim'

yvonneng996 commented 2 years ago

Hi, How to exactly go about changing the embed_dim into embed_dims. Do I change the files that is in the "base" under config.py? Need asap. Thank You

Tenglon commented 10 months ago

same here.