I have https://github.com/dmlc/tvm/blob/8fe715fee9faee43ae881f6d88af4518b0b9d19e/tutorials/frontend/from_tensorflow.py in my local folder and build tvm with the same version.
I am using Anaconda, tensorflow 1.14(cpu only), and when I ran python from_tensorflow.py
, I got following error msg:
File /home/$USER/.tvm_test_data/data/elephant-299.jpg exists, skip.
File /home/$USER/.tvm_test_data/tf/InceptionV1/classify_image_graph_def-with_shapes.pb exists, skip.
File /home/$USER/.tvm_test_data/data/imagenet_2012_challenge_label_map_proto.pbtxt exists, skip.
File /home/$USER/.tvm_test_data/data/imagenet_synset_to_human_label_map.txt exists, skip.
WARNING: Logging before flag parsing goes to stderr.
W0628 16:18:01.941706 140138023479104 deprecation.py:323] From from_tensorflow.py:92: FastGFile.__init__ (from tensorflow.python.platform.gfile) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.gfile.GFile.
W0628 16:18:01.941972 140138023479104 deprecation_wrapper.py:119] From from_tensorflow.py:93: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.
2019-06-28 16:18:02.368151: W tensorflow/core/framework/op_def_util.cc:357] Op BatchNormWithGlobalNormalization is deprecated. It will cease to work in GraphDef version 9. Use tf.nn.batch_normalization().
W0628 16:18:02.506516 140138023479104 deprecation_wrapper.py:119] From from_tensorflow.py:99: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2019-06-28 16:18:02.525582: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2500000000 Hz
2019-06-28 16:18:02.537842: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55783295ac20 executing computations on platform Host. Devices:
2019-06-28 16:18:02.537875: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): <undefined>, <undefined>
W0628 16:18:02.764468 140138023479104 deprecation.py:323] From /home/$USER/local/tvm/python/tvm/relay/testing/tf.py:86: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.convert_variables_to_constants`
W0628 16:18:02.764662 140138023479104 deprecation.py:323] From /home/$USER/.local/lib/python3.7/site-packages/tensorflow/python/framework/graph_util_impl.py:270: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
/home/$USER/local/tvm/python/tvm/relay/frontend/tensorflow.py:1974: UserWarning: Ignore the passed shape. Shape in graphdef will be used for operator DecodeJpeg/contents.
"will be used for operator %s." % node.name)
/home/$USER/local/tvm/python/tvm/relay/frontend/tensorflow.py:483: UserWarning: DecodeJpeg: It's a pass through, please handle preprocessing before input
warnings.warn("DecodeJpeg: It's a pass through, please handle preprocessing before input")
Traceback (most recent call last):
File "from_tensorflow.py", line 129, in <module>
shape=shape_dict)
File "/home/$USER/local/tvm/python/tvm/relay/frontend/tensorflow.py", line 2413, in from_tensorflow
mod, params = g.from_tensorflow(graph, layout, shape, outputs)
File "/home/$USER/local/tvm/python/tvm/relay/frontend/tensorflow.py", line 2058, in from_tensorflow
op = self._convert_operator(node.op, inputs, attr, graph)
File "/home/$USER/local/tvm/python/tvm/relay/frontend/tensorflow.py", line 2376, in _convert_operator
sym = convert_map[op_name](inputs, attrs, self._params)
File "/home/$USER/local/tvm/python/tvm/relay/frontend/tensorflow.py", line 562, in _impl
extras={'method': "BILINEAR"})(inputs, attr)
File "/home/$USER/local/tvm/python/tvm/relay/frontend/tensorflow.py", line 155, in __call__
return _get_relay_op(op_name)(*inputs, **new_attrs)
TypeError: resize() got an unexpected keyword argument 'half_pixel_centers'
I guess that is because I am using an incompatible version of tensorflow, so which version of TENSORFLOW am I supposed to use?