Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

TensorFlowEstimator.restore Error: tensorflow.python.pywrap_tensorflow.StatusNotOK #41

Closed
harsimranb opened this issue Dec 19, 2015 · 3 comments

Comments

@harsimranb
Copy link

Restore is still not working for the text_classification.py example. I am getting the following exception:

I tensorflow/core/common_runtime/local_device.cc:40] Local device intra op parallelism threads: 4
I tensorflow/core/common_runtime/direct_session.cc:58] Direct session inter op parallelism threads: 4
Traceback (most recent call last):
  File "/Users/harsimranb/PycharmProjects/TensorFlowTest/TextRNN.py", line 103, in <module>
    runner.run_classification("amigo what time you close?")
  File "/Users/harsimranb/PycharmProjects/TensorFlowTest/TextRNN.py", line 56, in run_classification
    classifier = skflow.TensorFlowEstimator.restore(self.trained_model_path)
  File "/Users/harsimranb/Library/Python/2.7/lib/python/site-packages/skflow/__init__.py", line 332, in restore
    estimator._restore(path)
  File "/Users/harsimranb/Library/Python/2.7/lib/python/site-packages/skflow/__init__.py", line 314, in _restore
    self._saver.restore(self._session, checkpoint_path)
  File "/Users/harsimranb/Library/Python/2.7/lib/python/site-packages/tensorflow/python/training/saver.py", line 891, in restore
    sess.run([self._restore_op_name], {self._filename_tensor_name: save_path})
  File "/Users/harsimranb/Library/Python/2.7/lib/python/site-packages/tensorflow/python/client/session.py", line 368, in run
    results = self._do_run(target_list, unique_fetch_targets, feed_dict_string)
  File "/Users/harsimranb/Library/Python/2.7/lib/python/site-packages/tensorflow/python/client/session.py", line 446, in _do_run
    six.reraise(e_type, e_value, e_traceback)
  File "/Users/harsimranb/Library/Python/2.7/lib/python/site-packages/tensorflow/python/client/session.py", line 428, in _do_run
    target_list)
tensorflow.python.pywrap_tensorflow.StatusNotOK: Internal: Unable to get element from the feed.

Related to #40

@ilblackdragon
Copy link
Contributor

Hm, it works in the case of just text_classification.py - I created an example in text_classification_save_restore.py.

Are you doing anything custom in the model that is different?

@ilblackdragon
Copy link
Contributor

I think it's the same issue as #43 - you were using relative path and TF doesn't work currently very well with that. I made a workaround by upping to absolute path when you call save/restore. Please try again and let me know if it doesn't work!

@harsimranb
Copy link
Author

That was it, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants