Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorflow ArgumentError Running CIFAR-10 example

I am trying to run the CIFAR-10 example of Tensorflow. However when executing python cifar10.py I am getting the error attached below.

I have installed Version 0.6.0 of the Tensorflow package using pip. The framework is working fine on other models including the MNIST tutorial and some self developed networks. Does anybody has an idea about the origin of the problem? Do you think I should open an issue on github?

I tensorflow/stream_executor/dso_loader.cc:101] successfully opened CUDA library libcublas.so.7.0 locally
I tensorflow/stream_executor/dso_loader.cc:101] successfully opened CUDA library libcudnn.so.6.5 locally
I tensorflow/stream_executor/dso_loader.cc:101] successfully opened CUDA library libcufft.so.7.0 locally
I tensorflow/stream_executor/dso_loader.cc:101] successfully opened CUDA library libcuda.so locally
I tensorflow/stream_executor/dso_loader.cc:101] successfully opened CUDA library libcurand.so.7.0 locally
Traceback (most recent call last):
  File "cifar10.py", line 54, in <module>
    """Number of images to process in a batch.""")
  File "/disk/no_backup/teichman/tensorflow/gpu_mode/local/lib/python2.7/site-packages/tensorflow/python/platform/default/_flags.py", line 86, in DEFINE_integer
    _define_helper(flag_name, default_value, docstring, int)
  File "/disk/no_backup/teichman/tensorflow/gpu_mode/local/lib/python2.7/site-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
like image 870
MarvMind Avatar asked Jan 12 '16 01:01

MarvMind


1 Answers

Solved the problem. One is not supposed to execute python cifar10.py directly, but one should run python cifar10_train.py or python cifar10_eval.py instead.

like image 195
MarvMind Avatar answered Oct 29 '22 05:10

MarvMind