rstrudel / segmenter

[ICCV2021] Official PyTorch implementation of Segmenter: Transformer for Semantic Segmentation
MIT License
846 stars 175 forks source link

TypeError: 'DefaultCfg' object does not support item assignment #69

Open kona419 opened 1 year ago

kona419 commented 1 year ago

Hello, I am just trying to rerun your codes. But I keep getting this error. How can I solve this problem?

Traceback (most recent call last): File "/home/nayoung/.conda/envs/nayoung/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 59, in _wrap fn(i, *args) File "/home/nayoung/nayoung/segmenter/segm/train.py", line 205, in main model = create_segmenter(net_kwargs) File "/home/nayoung/nayoung/segmenter/segm/model/factory.py", line 109, in create_segmenter encoder = create_vit(model_cfg) File "/home/nayoung/nayoung/segmenter/segm/model/factory.py", line 68, in create_vit model_cfg["image_size"][1], TypeError: 'DefaultCfg' object does not support item assignment

bo-miao commented 4 months ago

Solved by using this version: pip install timm==0.4.12