tensorflow 'module' object has no attribute 'contrib'
Problem solved, turns i had 2 tensorflow versions installed:
- When launching $python , it used 0.6 version(which didnt had contrib module)
- When launching $sudo python ,it had the latest 0.9 version and everything works as the documentation.
Luis Leal
Im a software and computer science engineer with experience developing software(back end primarily but not limited) including desktop,web, mobile apps. Im specialized in data having in my skillset: Machine Learning Data mining Artifical intelligence Software Engineering Big Data(hadoop, spark, etc) Business Intelligence/data warehousing Digital electronics Java,Python, R, .NET
Updated on June 04, 2022Comments
-
Luis Leal almost 2 years
I installed tensorflow(on python 2.7,debian linux) using the pip method as shown in official documentation: https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#pip-installation
Tested succesfully the installation as indicated by the installation ,but when doing the tutorial : https://www.tensorflow.org/versions/r0.9/tutorials/tflearn/index.html#construct-a-deep-neural-network-classifier
After importing tensorflow correctly , when trying the line:
training_set = tf.contrib.learn.datasets.base.load_csv(filename=IRIS_TRAINING, target_dtype=np.int)
Im getting the error : tensorflow 'module' object has no attribute 'contrib'
Does anybody knows that can be wrong?
Thank you
-
K.Alan about 7 yearsThank you. I had 2 tensorflow versions installed too. solved.