OFA icon indicating copy to clipboard operation
OFA copied to clipboard

Cannot load model parameters from checkpoint ../../checkpoints/ofa_base.pt; please ensure that the architectures match.

Open Xuanfang1121 opened this issue 3 years ago • 1 comments

When running train_caption_stage1.sh about Image Captioning, occur the following error:

Traceback (most recent call last): File "../../train.py", line 537, in cli_main() File "../../train.py", line 530, in cli_main distributed_utils.call_main(cfg, main) File "/home/OFA-main/fairseq/distributed/utils.py", line 389, in call_main main(cfg, **kwargs) File "../../train.py", line 170, in main disable_iterator_cache=True, File "/home/OFA-main/utils/checkpoint_utils.py", line 254, in load_checkpoint reset_meters=reset_meters, File "/home//OFA-main/trainer.py", line 526, in load_checkpoint "please ensure that the architectures match.".format(filename) Exception: Cannot load model parameters from checkpoint ../../checkpoints/ofa_base.pt; please ensure that the architectures match.

Download the model from the checkpointsimage

Xuanfang1121 avatar Oct 13 '22 06:10 Xuanfang1121

Wait wait... Aren't you using train_caption_stage1_base.sh but instead train_caption_stage1.sh? I think that is because of the script. The arch of train_caption_stage1.sh is ofa_large, and thus you can't load a base model

JustinLin610 avatar Nov 04 '22 07:11 JustinLin610