当前位置:网站首页>[padding] an error is reported in the prediction after loading the model weight attributeerror: 'model' object has no attribute '_ place‘

[padding] an error is reported in the prediction after loading the model weight attributeerror: 'model' object has no attribute '_ place‘

2022-07-06 03:10:00 Coke Daniel

summary

Use paddle Trained the model , End of training , There is no problem making predictions on the spot , Then saved the model
Then I load the model , An error is reported when you want to predict again

AttributeError: 'Model' object has no attribute '_place'

solve

stay model.load(‘/path’) Add the following sentence model.prepare() that will do
What principle is unknown

原网站

版权声明
本文为[Coke Daniel]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060300589764.html