Key lstm_o/rnn/basic_lstm_cell/kernel not found in checkpoint
See original GitHub issueDear eragonruan, I think your implementation of ctpn is an excellent job. When I run your demo, I have loaded other layers successfully except the lstm layer, It shows the output following: `Loading network VGGnet_test… Traceback (most recent call last): File “ctpn/demo.py”, line 89, in <module> saver.restore(sess, os.path.join(os.getcwd(),“checkpoints/model_final.ckpt”)) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py”, line 1560, in restore {self.saver_def.filename_tensor_name: save_path}) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py”, line 895, in run run_metadata_ptr) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py”, line 1124, in _run feed_dict_tensor, options, run_metadata) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py”, line 1321, in _do_run options, run_metadata) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/client/session.py”, line 1340, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.NotFoundError: Key lstm_o/rnn/basic_lstm_cell/kernel not found in checkpoint [[Node: save/RestoreV2_28 = RestoreV2[dtypes=[DT_FLOAT], _device=“/job:localhost/replica:0/task:0/cpu:0”](_arg_save/Const_0_0, save/RestoreV2_28/tensor_names, save/RestoreV2_28/shape_and_slices)]]
Caused by op u’save/RestoreV2_28’, defined at: File “ctpn/demo.py”, line 88, in <module> saver = tf.train.Saver() File “/usr/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py”, line 1140, in init self.build() File “/usr/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py”, line 1172, in build filename=self._filename) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py”, line 688, in build restore_sequentially, reshape) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py”, line 407, in _AddRestoreOps tensors = self.restore_op(filename_tensor, saveable, preferred_shard) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/training/saver.py”, line 247, in restore_op [spec.tensor.dtype])[0]) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_io_ops.py”, line 663, in restore_v2 dtypes=dtypes, name=name) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py”, line 767, in apply_op op_def=op_def) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py”, line 2630, in create_op original_op=self._default_original_op, op_def=op_def) File “/usr/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py”, line 1204, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
NotFoundError (see above for traceback): Key lstm_o/rnn/basic_lstm_cell/kernel not found in checkpoint [[Node: save/RestoreV2_28 = RestoreV2[dtypes=[DT_FLOAT], _device=“/job:localhost/replica:0/task:0/cpu:0”](_arg_save/Const_0_0, save/RestoreV2_28/tensor_names, save/RestoreV2_28/shape_and_slices)]]`
Could you please tell me where I’m wrong? The version of TensorFlow that I am using is 1.3
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
@senliuy @justttry I think this bug is caused by different version of tensorflow. My version is 1.1.0. here is a related problem,see this link
@sahithikilaru the checkpoints provided is in here print(old_name)