When I am running predict.py on test set for evaluation score using my mt-dnn trained model. I am facing this error. The reason I think they model architecture and checkpoints architecture are not the same.
missing_keys, unexpected_keys = self.network.load_state_dict(state_dict['state'], strict=False)
File "/Users/ikramali/.pyenv/versions/3.8.6/envs/ml/lib/python3.8/site-packages/torch/nn/modules/module.py", line 846, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for SANBertNetwork:
size mismatch for scoring_list.0.weight: copying a param with shape torch.Size([2, 1024]) from checkpoint, the shape in current model is torch.Size([26, 1024]).
size mismatch for scoring_list.0.bias: copying a param with shape torch.Size([2]) from checkpoint, the shape in current model is torch.Size([26]).
@namisan Please help.
When I am running predict.py on test set for evaluation score using my mt-dnn trained model. I am facing this error. The reason I think they model architecture and checkpoints architecture are not the same.
Command:
python predict.py --task="mdd" --task_id=0 --prep_input="data//mdd_test.json" --with_label --score="mdd_score.txt"
Error:
tasks.yml file: