tensorflow在对训练好的模型进行加载测试时,出现了这样的错误
在对训练好的模型进行加载测试时,出现了这样的错误
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,但是后面查看节点文件中却没有,这是什么原因。有没有大神解答一下啊,很感谢!!