Je débutez dans le tensorflow sur OSX et installé la version dure en suivant les lignes directrices pour une installation de pépin en utilisant:Erreur dans tf.contrib.learn Quickstart, aucun attribut nommé load_csv
echo $TF_BINARY_URL
https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.11.0rc0-py2-none-any.whl
Aperçu rapide:
OS: OS X El Capitan Version 10.11.6 (15G31)
Python: Python 2.7.12_1 installé avec brew install python
Tensor Débit: 0.11.0rc0 de import tensorflow as tf; print(tf.__version__)
je peux courir tensorflow en utilisant:
python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
>>> Hello, TensorFlow!
Alors tensorflow est installé et exécuté les commandes de base.
Mais quand je lance le code pour tf.contrib.learn Quickstart d'ici: https://www.tensorflow.org/versions/r0.11/tutorials/tflearn/index.html
Je reçois la question suivante:
Traceback (most recent call last):
File "tf_learn_quickstart.py", line 13, in <module>
training_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TRAINING,
AttributeError: 'module' object has no attribute 'load_csv'
Je ne peux pas comprendre ce qui a mal tourné que tout d'autre semble fonctionner correctement. Des idées ce qui ne va pas?
Merci. J'ai remplacé load_csv par load_csv_with_headers et ajouté l'argument supplémentaire pour feature_dtype = np.float32. –
@IsaacNoble C'est 'features_dtype'. À partir de [base.py] (https://github.com/tensorflow/tensorflow/blob/r0.11/tensorflow/contrib/learn/python/learn/datasets/base.py): 'load_csv_with_header (nom_fichier, type_type, caractéristiques_dtype , target_column = -1) ' –