Restoring from checkpoint failed.模型加载失败的问题及解决方案

InvalidArgumentError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [1,1,256,93] rhs shape= [1,1,256,69]
     [[Node: save/Assign_100 = Assign[T=DT_FLOAT, _class=["loc:@conv_sbbox/weight"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](conv_sbbox/weight, save/RestoreV2/_201)]]
 

 

应公司要求,在之前训练的模型上新增一个商品,所以在之前的继续上进行fine-tune,训练完成的模型在本地测试效果还不错,就放到服务器上进行重启,结果一直报错,该更改的地方都已经修改了, 为什么还会错误呢,一早上排查了两个小时都没找到错误,按照错误信息在网上搜索也是提示模型的问题。百思不得其解的时候,我突然灵光一闪,想要检查一下.names文件,结果发现服务器上的.names文件没有更新。因为这个项目我分为本地个人文件,本地服务器文件,在上传服务器的时候弄混了,导致服务器上的没有更新。把文件替换以后就可以了。(一脸无奈》_《)

单独记录一下,当class.names文件不对时,也会报上述错误。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章