do_predict问题
Closed this issue · 1 comments
Yesgo1220 commented
对torch不太熟悉,请问在只do_predict的时候,没有找到load_state_dict这样的操作,模型是怎么预测的?麻烦指点一二,感谢。作者是否应该在do_predict中加上model.load_state_dict(torch.load(model_name))
liuwei1206 commented
Hi,
Thanks for your comment. When do evaluation or prediction, I will change the model_name_or_path with the trained checkpoint. In this way, you can load it with from_pretrain function.
Best