Error while loading saved model
kengz opened this issue · comments
Wah Loon Keng commented
Saved a model successfully, but on reloading it skflow.TensorFlowEstimator.restore(<the saved path>)
threw an error. Currently running the latest installation of six 1.10.0, pandas 0.17.1, tensorflow 0.7.1, skflow 0.1.0, python 3.5 on Mac OSX.
Traceback (most recent call last):
File "titanic.py", line 37, in <module>
new_classifier = skflow.TensorFlowEstimator.restore('./models/titanic_dnn_1')
File "/usr/local/lib/python3.5/site-packages/skflow/estimators/base.py", line 463, in restore
estimator._restore(path)
File "/usr/local/lib/python3.5/site-packages/skflow/estimators/base.py", line 401, in _restore
saver_def = tf.python.training.saver_pb2.SaverDef()
AttributeError: module 'tensorflow.python.training' has no attribute 'saver_pb2'
Yuan Tang commented
Try install the updated version from Github.
Wah Loon Keng commented
Found a bug fix (inelegant) on StackOverflow: http://stackoverflow.com/questions/35789666/tensorflow-with-skflow-attributeerror-module-object-has-no-attribute-saver
The version installed from Github throws the error:
ImportError: No module named 'cPickle'
Wah Loon Keng commented
Solved.