zhenhao-huang / paddlehub_ernie_emotion_analysis

百度PaddleHub-ERNIE微调中文情感分析(文本分类)
19 stars 1 forks source link

替换别的model失败 #3

Open mjx990307 opened 3 years ago

mjx990307 commented 3 years ago

你好 我用您的代码可以运行ernie的model 但是换成别的比如bert就会报错 Variable Shape not match, Variable [ embedding_0.w_0_moment1_0 ] need tensor with shape (21128, 768) but load set tensor with shape (50006, 1024) 像这样 请问是什么问题呢

zhenhao-huang commented 3 years ago

您用的是哪个bert模型呢

mjx990307 commented 3 years ago

bert-base-chinese 是不是因为之前运行ernie保存的checkpoint被新模型读取导致参数纬度错误 感谢您的答复

---原始邮件--- 发件人: @.> 发送时间: 2021年8月17日(周二) 晚上11:35 收件人: @.>; 抄送: @.**@.>; 主题: Re: [zhenhao-huang/paddlehub_ernie_emotion_analysis] 替换别的model失败 (#3)

您用的是哪个bert模型呢

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

zhenhao-huang commented 3 years ago

是的,训练新模型需要删除原来ernie_checkpoint保存的模型

mjx990307 commented 3 years ago

好的 感谢您的答复

---原始邮件--- 发件人: @.> 发送时间: 2021年8月17日(周二) 晚上11:52 收件人: @.>; 抄送: @.**@.>; 主题: Re: [zhenhao-huang/paddlehub_ernie_emotion_analysis] 替换别的model失败 (#3)

是的,训练新模型需要删除原来ernie_checkpoint保存的模型

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.