Compile Tensorflow Models - TypeError


#1

I am trying to run the following tutorial: Compile Tensorflow Models.
However, at this part:

mod, params = relay.frontend.from_tensorflow(graph_def,
                                             layout=layout,
                                             shape=shape_dict)

I get the following error about the shape.

Traceback (most recent call last):
  File "tf_conversion.py", line 68, in <module>
    shape=shape_dict)
  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 2414, in from_tensorflow
    mod, params = g.from_tensorflow(graph, layout, shape, outputs)
  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 2059, in from_tensorflow
    op = self._convert_operator(node.op, inputs, attr, graph)
  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 2377, in _convert_operator
    sym = convert_map[op_name](inputs, attrs, self._params)
  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 562, in _impl
    extras={'method': "BILINEAR"})(inputs, attr)
  File "/usr/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'

What seems to be the problem?


#2

I came across the same problem days ago with tensorflow-1.14.0.
Now I use tensorflow-1.12.0 and everything works fine.