tensorflow在对训练好的模型进行加载测试时,出现了这样的错误

qq_45805964 2020-03-16 09:44:43
在对训练好的模型进行加载测试时,出现了这样的错误
tensorflow.python.framework.errors_impl.NotFoundError: 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:

Key pose_net/Stage2/unit_1/depthwise/depthwise_weights not found in checkpoint
[[node save/RestoreV2 (defined at test_kitti_pose.py:65) ]]
在网络结构里我用到一个tf.nn.depthwise_conv2d
这个函数的权重我已经定义了变量
W = tf.get_variable(
'depthwise_weights',
[kernel, kernel, in_channels, 1], dtype=tf.float32,
initializer=weights_initializer
)
开始训练时后打印的可训练变量中有这个参数pose_net/Stage2/unit_1/depthwise/depthwise_weights,但是后面查看节点文件中却没有,这是什么原因。有没有大神解答一下啊,很感谢!!
...全文
922 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
然然然然后 2021-12-08
  • 打赏
  • 举报
回复

请问您解决这个问题了吗?同样遇到了,难以解决

4,499

社区成员

发帖
与我相关
我的任务
社区描述
图形图像/机器视觉
社区管理员
  • 机器视觉
  • 迪菲赫尔曼
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧