SeqGenSQL icon indicating copy to clipboard operation
SeqGenSQL copied to clipboard

RuntimeError: Error(s) in loading state_dict for SeqGenSQL

Open ruizcrp opened this issue 3 years ago • 0 comments

After running python ./score.py --ckpt_path models/base_gated_e09_0.02626.ckpt with the downloaded file:

Loading database file...Done! Loading T5FinalTuner pretrained model...Traceback (most recent call last): File "./score.py", line 55, in model = SeqGenSQL.load_from_checkpoint(args.ckpt_path) File "/home/z01/nlp_learn/SeqGenSQL/.seqgensql/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 153, in load_from_checkpoint model = cls._load_model_state(checkpoint, strict=strict, **kwargs) File "/home/z01/nlp_learn/SeqGenSQL/.seqgensql/lib/python3.8/site-packages/pytorch_lightning/core/saving.py", line 196, in _load_model_state model.load_state_dict(checkpoint['state_dict'], strict=strict) File "/home/z01/nlp_learn/SeqGenSQL/.seqgensql/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for SeqGenSQL: Unexpected key(s) in state_dict: "model.decoder.block.0.layer.1.EncDecAttention.relative_attention_bias.weight".

ruizcrp avatar Mar 24 '21 19:03 ruizcrp