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

cifar10 not running #1105

Closed
omarcr opened this issue Feb 15, 2016 · 8 comments
Closed

cifar10 not running #1105

omarcr opened this issue Feb 15, 2016 · 8 comments
Labels

Comments

@omarcr
Copy link

omarcr commented Feb 15, 2016

Execution tracebacks of cyfar10.py and cifar10_train.py:

python cifar10.py:

Traceback (most recent call last):
  File "/media/konet/01D15611945D72C0/Pycharm_ubuntu/tf_models/image/cifar10/cifar10.py", line 53, in <module>
    """Number of images to process in a batch.""")
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_flags.py", line 86, in DEFINE_integer
    _define_helper(flag_name, default_value, docstring, int)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_flags.py", line 60, in _define_helper
    type=flagtype)
  File "/usr/lib/python2.7/argparse.py", line 1297, in add_argument
    return self._add_action(action)
  File "/usr/lib/python2.7/argparse.py", line 1671, in _add_action
    self._optionals._add_action(action)
  File "/usr/lib/python2.7/argparse.py", line 1498, in _add_action
    action = super(_ArgumentGroup, self)._add_action(action)
  File "/usr/lib/python2.7/argparse.py", line 1311, in _add_action
    self._check_conflict(action)
  File "/usr/lib/python2.7/argparse.py", line 1449, in _check_conflict
    conflict_handler(action, confl_optionals)
  File "/usr/lib/python2.7/argparse.py", line 1456, in _handle_conflict_error
    raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --batch_size: conflicting option string(s): --batch_size

python cifar10.py:

Traceback (most recent call last):
  File "/media/konet/01D15611945D72C0/Pycharm_ubuntu/tf_models/image/cifar10/cifar10_train.py", line 135, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "/media/konet/01D15611945D72C0/Pycharm_ubuntu/tf_models/image/cifar10/cifar10_train.py", line 128, in main
    if tf.gfile.Exists(FLAGS.train_dir):
AttributeError: 'module' object has no attribute 'gfile'

Using:
tensorflow v 0.6 + Titan GPU configured for GPU usage as per instruction in setup.

@ghost
Copy link

ghost commented Feb 16, 2016

Something similar with MNIST: (TF built from source from scratch 10 minutes ago, master branch)

Traceback (most recent call last):
File "/home//****//expr.py", line 133, in
mnist = input_data.read_data_sets('MNIST_data')
File "/usr/local/lib/python2.7/dist-packages/tensorflow/examples/tutorials/mnist/input_data.py", line 199, in read_data_sets
train_images = extract_images(local_file)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/examples/tutorials/mnist/input_data.py", line 57, in extract_images
with tf.gfile.Open(filename) as f, gzip.GzipFile(fileobj=f) as bytestream:
AttributeError: 'module' object has no attribute 'Open'
Extracting MNIST_data/train-images-idx3-ubyte.gz

Process finished with exit code 1

@vrv vrv added the bug label Feb 16, 2016
@vrv vrv closed this as completed in 1c30801 Feb 16, 2016
@vrv
Copy link

vrv commented Feb 16, 2016

I fixed the latter one, I'm not sure why the former is happening. You shouldn't be running cifar10.py -- it's a library called by the other executables.

@vrv
Copy link

vrv commented Feb 16, 2016

(Note that you have to build from sources to get the fix. Our first post-0.7 binary release will likely get this fix.)

@ghost
Copy link

ghost commented Feb 16, 2016

I'm confused by the post-0.7 part, as far as I can see the 0.7 branch is still behind in some aspects to master, you have already built the 0.7 release binaries?

@vrv
Copy link

vrv commented Feb 16, 2016

Yeah, the binaries are being built right now, we can maybe make a patch-release with these fixes (I expect we're going to want a protobuf fix in the patch release too).

@omarcr
Copy link
Author

omarcr commented Feb 16, 2016

In the instructions says (https://www.tensorflow.org/versions/v0.6.0/tutorials/deep_cnn/index.html)

That the following needs to be executed to train the network:
python cifar10_train.py

Is this fixed now?

@vrv
Copy link

vrv commented Feb 16, 2016

If you build from sources at HEAD, yes.

vrv pushed a commit to vrv/tensorflow that referenced this issue Feb 17, 2016
vrv pushed a commit that referenced this issue Feb 17, 2016
@mohamed-ali
Copy link

updating tensorflow install with sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl fixed the cifar10 issue.
(PS: for my case I am using the CPU version.)

@aselle aselle added type:bug Bug and removed bug labels Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants