You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to convert a resnet style model into TVM, but I got the error message:
Traceback (most recent call last):
File "tensorflow_tvm.py", line 47, in <module>
mod, params = relay.frontend.from_tensorflow(graph_def,
File "/home/lesliefang/tvm/tvm/python/tvm/relay/frontend/tensorflow.py", line 3574, in from_tensorflow
mod, params = g.from_tensorflow(graph, layout, shape, outputs)
File "/home/lesliefang/tvm/tvm/python/tvm/relay/frontend/tensorflow.py", line 2967, in from_tensorflow
func = self._get_relay_func(graph, layout=layout, shape=shape, outputs=outputs)
File "/home/lesliefang/tvm/tvm/python/tvm/relay/frontend/tensorflow.py", line 2926, in _get_relay_func
self._backtrack_construct(node.name)
File "/home/lesliefang/tvm/tvm/python/tvm/relay/frontend/tensorflow.py", line 3508, in _backtrack_construct
op = self._convert_operator(node.op, inputs, attr, self._graph)
File "/home/lesliefang/tvm/tvm/python/tvm/relay/frontend/tensorflow.py", line 3365, in _convert_operator
sym = convert_map[op_name](inputs, attrs, self._params, self._mod)
File "/home/lesliefang/tvm/tvm/python/tvm/relay/frontend/tensorflow.py", line 1265, in _impl
out = AttrCvt(op_name='batch_norm',
File "/home/lesliefang/tvm/tvm/python/tvm/relay/frontend/common.py", line 417, in __call__
return get_relay_op(op_name)(*inputs, **new_attrs)
TypeError: batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Refer to this issue #3428, I have checked my model's bn op. it doesn't set this attr. But since this PR tensorflow/tensorflow#37176, tensorflow should set the default value of this attr.
I have 2 questions:
It seems TVM will also check the op definition in Tensorflow's implementation, why not just check the user-defined attribution in the PB model?
Thanks for reporting the problem, the community uses https://discuss.tvm.ai/ for quick trouble shooting and discussions, please open a new thread there
@tqchen I don't see the issue solved with top of tree today.
but adding @Leslie-Fang solution to common.py does work. I think it's ok because these ops are training ops that should have been removed from frozen graphs....
Same thing for RandomUniform, FIFOQueue(V2) , QueueDequeueMany(V2)?
I am trying to convert a resnet style model into TVM, but I got the error message:
Refer to this issue #3428, I have checked my model's bn op. it doesn't set this attr. But since this PR tensorflow/tensorflow#37176, tensorflow should set the default value of this attr.
I have 2 questions:
here? https://github.com/apache/incubator-tvm/blob/512ed3930a61daf38e80e1f71e51f0d1f139fb8e/python/tvm/relay/frontend/common.py#L367-L374
The text was updated successfully, but these errors were encountered: