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文件不對時,也會報上述錯誤。

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