dandelin / ViLT

Code for the ICML 2021 (long talk) paper: "ViLT: Vision-and-Language Transformer Without Convolution or Region Supervision"
Apache License 2.0
1.36k stars 208 forks source link

RuntimeError: Invalid pretrained config, cannot load weights. Use `pretrained=False` for random init. #95

Open nameyun opened 1 week ago

nameyun commented 1 week ago

Dear Author When I change 【pretrain=False】 to 【pretrain=True】, as shown in Figure 1, Then use the command 【python run.py with data_root=/root/autodl-tmp/ViLT/csdia_arrow num_gpus=1 task_finetune_vqa_randaug per_gpu_batchsize=64 load_path="/root/autodl-tmp/vilt_200k_mlm_itm.ckpt"】 When pretraining, the following error occurs【RuntimeError: Invalid pretrained config, cannot load weights. Use pretrained=False for random init.】,as shown in Figure 2.

How to solve this problem?

Figure 1: image

Figure 2: image