Nach dem erfolgreichen TensorFlow Sourcen, das erste Testbeispiel geht, und die zweite nicht:Gebaut TensorFlow erfolgreich; Beispiel versagt
1) Erster Test: OK
$ python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
2) Zweiter Test: failed
Testdatei : tensorflow/Modelle/image/mnist/convolutional.py
$ sudo python convolutional.py
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally
Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes.
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes.
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes.
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes.
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
Traceback (most recent call last):
File "convolutional.py", line 339, in <module>
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "convolutional.py", line 231, in main
logits, train_labels_node))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/nn_ops.py", line 1684, in sparse_softmax_cross_entropy_with_logits
labels, logits)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/nn_ops.py", line 1533, in _ensure_xent_args
"named arguments (labels=..., logits=..., ...)" % name)
ValueError: Only call `sparse_softmax_cross_entropy_with_logits` with named arguments (labels=..., logits=..., ...)
Da die convolutional.py
einer der Tests in der Montageanleitung angegeben ist, würde ich exp ect es gut zu sein.
Ich lief alle Tests im Verzeichnis des Projekts, und das sind die Ergebnisse:
- MNIST: failed
- AlexNet: bestanden
- Cifar10:
- IMAGEnet fehlgeschlagen: bestanden
Könnte ich irgendetwas falsch gemacht haben, oder mache ich etwas falsches beim Ausführen dieser Tests?
Referenz: https://www.tensorflow.org/get_started/os_setup
Plattform: Linux/Ubuntu 16.04, nVidia Quadro M6000, CUDA aktiviert.
Ich denke, diese Frage ist für SO außerhalb des Themas. Wenn da irgendeine "Frage" ist ... – Taro
@Taro: Ich habe die Frage deutlicher gemacht. – Pietro
Was ich verstehe ist, dass Ihre Probleme spezifisch für Tensorflow sind und nicht für irgendeine Software, die Sie gemacht haben. Also wieder, ich denke, es ist off-topic, möchten Sie vielleicht jedes Tensorflow-bezogene Dokument/Forum versuchen. – Taro