Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
具体报错见下图:
上面报错的位置在我加载了之前训练好的模型参数上,在网上查找了好久,一种说法是在此处,意思是用了同一个网络,不同的参数作了两次训练,服务器上存储的是第一个网络的参数,当先测试过第一个,再测试第二个就会报错。
我想了很久,不像是这个错误,后来在老师的帮助下才发现问题。
这是之前的部分代码:
这是改进后的部分代码:
我是在加载预定义模型和初始化这些参数之间的逻辑没有搞清楚,才会报上面那种错误,还是得多学习多思考才行。
This is most likely due to a Variable name or other graph key that is missing from the checkpoint. P
最新推荐文章于 2023-04-29 13:49:22 发布