I'm on Ubuntu 16.04. I have: Python 2.7.12, Python 3.5.2, tensorflow 1.2.0-rc1, protobuf 3.3.0.
I want to follow this tutorial.
But I think my problem can be evidenced more succinctly with this test.py:
import tensorflow as tf
regressor = tf.contrib.learn.LinearRegressor(feature_columns=[])
I cannot instantiate regressor. I get (full Traceback at the end):
google.protobuf.text_format.ParseError: 48:12 : Message type "tensorflow.AttrValue" has no field named "5".
Same goes in [21] of the tutorial. Same goes with python2 and python3. Same goes if I use LinearClassifier instead of LinearRegressor.
Any idea about what I am doing very wrong?
Traceback (most recent call last):
File "test.py", line 2, in regressor = tf.contrib.learn.LinearRegressor(feature_columns=[])
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/lazy_loader.py", line 53, in getattr module = self._load()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/lazy_loader.py", line 42, in _load module = importlib.import_module(self.name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/init.py", line 35, in from tensorflow.contrib import image
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/image/init.py", line 40, in from tensorflow.contrib.image.python.ops.single_image_random_dot_stereograms import single_image_random_dot_stereograms
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/image/python/ops/single_image_random_dot_stereograms.py", line 26, in "_single_image_random_dot_stereograms.so"))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/contrib/util/loader.py", line 55, in load_op_library ret = load_library.load_op_library(path)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 84, in load_op_library exec(wrappers, module.dict)
File "", line 248, in
File "", line 114, in _InitOpDefLibrary
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 481, in Merge descriptor_pool=descriptor_pool)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 535, in MergeLines return parser.MergeLines(lines, message)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 568, in MergeLines self._ParseOrMerge(lines, message)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 583, in _ParseOrMerge self._MergeField(tokenizer, message)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 684, in _MergeField merger(tokenizer, message, field)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 773, in _MergeMessageField self._MergeField(tokenizer, sub_message)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 684, in _MergeField merger(tokenizer, message, field)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 773, in _MergeMessageField self._MergeField(tokenizer, sub_message)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 684, in _MergeField merger(tokenizer, message, field)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 773, in _MergeMessageField self._MergeField(tokenizer, sub_message)
File "/usr/local/lib/python2.7/dist-packages/google/protobuf/text_format.py", line 652, in _MergeField (message_descriptor.full_name, name))
regressor = tf.contrib.learn.LinearRegressor(feature_columns=[])
asserts because thefeature_columns
may not be empty, but there is no error with protobuf so it has to be a change from r1.1 to r1.2 that causes this. – Maximilian Köstler