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

CUB数据集上复现报错 #2

Open
realfzyyyyy opened this issue May 12, 2023 · 4 comments
Open

CUB数据集上复现报错 #2

realfzyyyyy opened this issue May 12, 2023 · 4 comments

Comments

@realfzyyyyy
Copy link

在使用MixViT-main/scripts/train_cub.sh复现mixvit时会报错:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 883, in getitem
field = self._fields[key]
KeyError: 'resnet'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 807, in getattr
return self[attribute]
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 889, in getitem
raise KeyError(self._generate_did_you_mean_message(key, str(e)))
KeyError: "'resnet'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/data/private/MixViT-main/train.py", line 458, in
main()
File "/opt/data/private/MixViT-main/train.py", line 451, in main
args, model = setup(args)
File "/opt/data/private/MixViT-main/train.py", line 102, in setup
model = make_model(config, args, zero_head=True, num_classes=num_classes, vis=True)
File "/opt/data/private/MixViT-main/models/make_model.py", line 94, in make_model
model = build_transformer(config, args, zero_head=True, num_classes=num_classes, vis=True)
File "/opt/data/private/MixViT-main/models/make_model.py", line 43, in init
self.inter_arch = ResNetV2(block_units=config.resnet.num_layers,
File "/usr/local/lib/python3.6/dist-packages/ml_collections/config_dict/config_dict.py", line 809, in getattr
raise AttributeError(e)
AttributeError: "'resnet'"
请问是什么情况呢?

@Markin-Wang
Copy link
Owner

Hi, CUB上的实验是在纯ViT架构下做的,纯vit代码在mixvit_purevit,请在纯vit目录下运行train_cub.sh脚本。

@realfzyyyyy
Copy link
Author

realfzyyyyy commented May 12, 2023 via email

@realfzyyyyy
Copy link
Author

Hi, CUB上的实验是在纯ViT架构下做的,纯vit代码在mixvit_purevit,请在纯vit目录下运行train_cub.sh脚本。

请问实验过程中使用了几张卡呢?单卡复现过程中结果始终与文中的差一点

@Markin-Wang
Copy link
Owner

Hi, 实验是在2x2080Ti上做的。

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

2 participants