I'm running TensorFlow version r0.10 on Ubuntu 16.04. I have been able to run some basic tutorials, including the MIST character recognition tutorial.
I'm trying to complete the CIFAR-10 tutorial example from TensorFlow, on tensorflow version r0.10.
When I execute cifar10_train.py
After: Filling queue with 20000 CIFAR images before starting to train. This will take a few minutes.
The script fails with:
File "cifar10_train.py", line 85, in train class _LoggerHook(tf.train.SessionRunHook): AttributeError: 'module' object has no attribute 'SessionRunHook'
Please could someone help me find the solution to this error?
Thank you
The code you are trying to run is from a later version of the TensorFlow repository than the version you have installed:
tf.train.SessionRunHook
was added to the master branch on November 23rd, 2016, and is part of the r0.12 release.tf.train.SessionRunHook
class itself was created on October 3rd, 2016, and first became part of an official release in r0.12.TensorFlow tutorial code only works with the contemporary version of the library. To run the CIFAR-10 tutorial using r0.10, you should clone the r0.10
branch of the GitHub repository:
$ git clone -b r0.10 https://github.com/tensorflow/tensorflow.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With