Skip to content

[RELAY][Bug] 'name_hint' AttributeError issue when covert tensorflow to TVM #4262

@FinnWeng

Description

@FinnWeng

This issue happens when converting tf.tile and tf.transpose with relay.frontend.from_tensorflow

My environment is:
develop: python3.6, tensorflow1.14
convert to TVM: container of tvmai/demo-gpu

Here's the error log for converting code which contains tf.transpose:

Traceback (most recent call last):

  File "read_pb_to_TVM_test.py", line 80, in <module>
    shape=shape_dict)

  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 2372, in from_tensorflow
    mod, params = g.from_tensorflow(graph, layout, shape, outputs)

  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 2017, in from_tensorflow
    op = self._convert_operator(node.op, inputs, attr, graph)

  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 2335, in _convert_operator
    sym = convert_map[op_name](inputs, attrs, self._params)

  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 932, in _impl
    axes = _get_list_param(params, inputs[1])

  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 96, in _get_list_param
    return _get_param(params, input_node).tolist()

  File "/usr/tvm/python/tvm/relay/frontend/tensorflow.py", line 90, in _get_param
    return params.pop(input_node.name_hint).asnumpy()

  File "/usr/tvm/python/tvm/_ffi/_ctypes/node.py", line 75, in __getattr__
    "'%s' object has no attribute '%s'" % (str(type(self)), name))

AttributeError: '<class 'tvm.relay.expr.Call'>' object has no attribute 'name_hint'

thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions