I tried to run the iris_save_restore.py
example from skflow, without changing the code at all.
However, I got an error, and I am unsure how to proceed. It seems that it happened when it restores the model from a saved file.
new_classifier = skflow.TensorFlowEstimator.restore('/tmp/skflow_examples/iris_custom_model')
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
score = metrics.accuracy_score(y_test, new_classifier.predict(X_test))
print('Accuracy: {0:f}'.format(score)) File "/Users/hamayu/.pyenv/versions/anaconda2-2.5.0/lib/python2.7/site-packages/skflow/estimators/base.py", line 463, in restore
estimator._restore(path)
File "/Users/hamayu/.pyenv/versions/anaconda2-2.5.0/lib/python2.7/site-packages/skflow/estimators/base.py", line 401, in _restore
saver_def = tf.python.training.saver_pb2.SaverDef()
AttributeError: 'module' object has no attribute 'saver_pb2'
I use the following versions:
- anaconda2-2.5.0
- tensorflow 0.7 CPU-only for Mac OS X
- skflow 0.1.0
How can I fix it?