Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AttributeError: module 'tensorflow' has no attribute 'feature_column'

So I am new to machine learning and was trying out the TensorFlow Linear Model Tutorial given here: https://www.tensorflow.org/tutorials/wide

I literally just downloaded their tutorial and tried to run it in my computer but I got the error:

AttributeError: module 'tensorflow' has no attribute 'feature_column'

I searched online and got to know that this can happen on older versions of tensorflow, but I am running the latest version: 1.3.0

So why am I getting this error and how to fix it?

like image 800
Ank Avatar asked Oct 23 '17 05:10

Ank


1 Answers

Tensorflow 1.3 should support feature_column well. You might accidentally used an old version. Try the following code to verify your version:

import tensorflow as tf
print(tf.__version__)
print(dir(tf.feature_column))
like image 77
Max Avatar answered Nov 15 '22 15:11

Max