Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError:Datasets' object has no attribute 'training_data #6

Open
Harold-Zhang opened this issue Dec 15, 2017 · 1 comment
Open

Comments

@Harold-Zhang
Copy link

Harold-Zhang commented Dec 15, 2017

I tested the code from /matex/src/deeplearning/tensorflow/examples/glibc_after_2.19/MNIST/tf_lenet3.py with command python tf_lenet3.py and I got an error:

Traceback (most recent call last):
  File "tf_lenet3.py", line 17, in <module>
    mnist = tf.DataSet("MNIST", normalize=255.0)
AttributeError: module 'tensorflow' has no attribute 'DataSet'

Then, I modified the code. I added from tensorflow.examples.tutorials.mnist import input_data and mnist = input_data.read_data_sets('MNIST_data', one_hot=True), removed mnist = tf.DataSet("MNIST", normalize=255.0) and I got the following error:

Traceback (most recent call last):
  File "tf_lenet3.py", line 70, in <module>
    for train_batch in range(int(len(mnist.training_data)/args.train_batch)):
AttributeError: 'Datasets' object has no attribute 'training_data'

What should I do to solve the problem?
@jeffdaily @vamatya @abhinavvishnu @charlesmsiegel @cabe1980 Thanks for your help!

@charlesmsiegel
Copy link
Collaborator

Our DataSet class and the Tensorflow Datasets class do not have compatible interfaces. Which version of the code are you using? Could you post the contents of your /mates/src/deeplearning/tensorflow/gpu/py3.x/py_distro/lib/python3.5/site-packages/tensorflow/init.py (or appropriate analogue if using cpu version)?

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

No branches or pull requests

2 participants