Open sdsdsz opened 1 year ago
You need to specify a correct vit structure by -a. There is no such structure in ViT named 'B16' .
I ran into the same problem with test_arb and test_imagenet.
Traceback (most recent call last):
File "D:\Monkey\MonkeyProject\TransCL-main\classification\test_arb.py", line 315, in
(py3.8) E:\TransCL-main\classification>python main_imagenet.py -a 'B16' -b 128 --image_size 384 --gpu 0 --lr 1e-3 --log_dir logs/transcl_384_imagenet_p32_01 --cs=1 --mm=1 --save_path=transcl_384_imagenet_p32_01 --rat 0.1 --data / group/30042/public_datasets/imagenet1k main_imagenet.py:105: UserWarning: You have chosen a specific GPU. This will completely disable data parallelism. warnings.warn('You have chosen a specific GPU. This will completely ' Use GPU: 0 for training Traceback (most recent call last): File "main_imagenet.py", line 494, in
main()
File "main_imagenet.py", line 123, in main
main_worker(args.gpu, ngpus_per_node, args)
File "main_imagenet.py", line 153, in main_worker
model = ViT(args.arch, pretrained=True, image_size=(args.image_size, args.image_size), num_classes=1000,
File "E:\TransCL-main\classification\vit\model.py", line 71, in init
assert name in PRETRAINED_MODELS.keys(), \
AssertionError: name should be in: B_16, B_32, L_16, L_32, B_16_imagenet1k, B_32_imagenet1k, L_16_imagenet1k, L_32_imagenet1k
I don't know why