question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Key lstm_o/rnn/basic_lstm_cell/kernel not found in checkpoint

See original GitHub issue

Dear 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:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
eragonruancommented, Sep 25, 2017

@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

0reactions
eragonruancommented, Mar 7, 2018

@sahithikilaru the checkpoints provided is in here print(old_name)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Key lstm/basic_lstm_cell/kernel not found in checkpoint #9
The same issue already opened, sorry. I had tried to run your model on the latest version of TF (1.2.0), but encountered the...
Read more >
im2txt & TensorFlow 1.4.1 - python - Stack Overflow
Does anyone here succeed to run im2txt with TensorFlow 1.4.1? ... Then I tried the following script to convert model. The script generated ......
Read more >
Key rnn/basic_lstm_cell/bias not found in checkpoint
删除了以前目录结构立马就可以胃。。。 光英的记忆. 关注 关注.
Read more >
Getting issue in updating code from Tensorflow V1 to V2
BasicLSTMCell is deprecated and will be removed in a future version. ... Not found: Key model/cnn/BatchNorm/gamma not found in checkpoint
Read more >
Tensorflow Not Finding A Variable In Checkpoint - ADocLib
On this page; Used in the notebooks; Args; Returns. Run error: Key Conv/biases not found in checkpoint.Variable rnn/rnn/basiclstmcell/kernel already exists ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found