0

So, I literally copied and pasted the code from this quickstart:

https://www.tensorflow.org/get_started/estimator

into a new datalab notebook.... this code has worked for me many times in the past but now I'm getting an error that says the tf module does not contain the attribute 'feature_column'... this thing

https://www.tensorflow.org/api_docs/python/tf/feature_column

really sorta at a loss as to what I should do from here, any ideas? I've found this question

'module' object has no attribute 'feature_column'

and the OP said it had something to do with version control? Perhaps there's a way to ensure datalab is using the latest version of Tensorflow? Not sure where to begin looking through datalab's version controls... google searching hasn't returned anything that has jumped out at me so far...

enter image description here

Jacob
  • 159
  • 3
  • 13

1 Answers1

2

It's probably because of different TensorFlow version. The sample on https://www.tensorflow.org/get_started/estimator is based on tf 1.3. So install 1.3 in your Datalab instance by running the following in a cell:

!pip install tensorflow==1.3

See if it works. Note that Datalab's preinstalled TF is 1.0 (will be updated soon). So if you create a new instance of Datalab you'll need to install it again.

Bradley Jiang
  • 424
  • 2
  • 1
  • Screenshot of error: https://drive.google.com/file/d/0BwA2KVlVFTQtV3YwYXQ1d1pDX0U/view?usp=sharing Exact copy of code: https://drive.google.com/file/d/0BwA2KVlVFTQtNi16UGlsQ3RtSmM/view?usp=sharing I added a line on line 82, just to save the meta graph to a file after training, obviously the error was before line 82... obviously I ran your !pip install function in a cell prior to this code – Jacob Aug 23 '17 at 17:04