You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/07/02 07:13:21 UTC
[GitHub] [incubator-tvm] Leslie-Fang opened a new issue #5978: [Frontend][TENSORFLOW] batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Leslie-Fang opened a new issue #5978:
URL: https://github.com/apache/incubator-tvm/issues/5978
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 https://github.com/apache/incubator-tvm/issues/3428, I have checked my model's bn op. it doesn't set this attr. But since this PR https://github.com/tensorflow/tensorflow/pull/37176, tensorflow should set the default value of this attr.
I have 2 questions:
1. 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.
2. It's ok for me to just add the
```
self._ignores.append('exponential_avg_factor')
```
here https://github.com/apache/incubator-tvm/blob/512ed3930a61daf38e80e1f71e51f0d1f139fb8e/python/tvm/relay/frontend/common.py#L367-L374
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-tvm] mikeseven edited a comment on issue #5978: [Frontend][TENSORFLOW] batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Posted by GitBox <gi...@apache.org>.
mikeseven edited a comment on issue #5978:
URL: https://github.com/apache/incubator-tvm/issues/5978#issuecomment-699698023
@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) , QueueDequeue(V2)?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-tvm] mikeseven edited a comment on issue #5978: [Frontend][TENSORFLOW] batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Posted by GitBox <gi...@apache.org>.
mikeseven edited a comment on issue #5978:
URL: https://github.com/apache/incubator-tvm/issues/5978#issuecomment-699698023
@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)?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-tvm] tqchen commented on issue #5978: [Frontend][TENSORFLOW] batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Posted by GitBox <gi...@apache.org>.
tqchen commented on issue #5978:
URL: https://github.com/apache/incubator-tvm/issues/5978#issuecomment-653289235
Thanks for reporting the problem, the community uses https://discuss.tvm.ai/ for quick trouble shooting and discussions, please open a new thread there
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-tvm] tqchen closed issue #5978: [Frontend][TENSORFLOW] batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Posted by GitBox <gi...@apache.org>.
tqchen closed issue #5978:
URL: https://github.com/apache/incubator-tvm/issues/5978
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-tvm] Leslie-Fang commented on issue #5978: [Frontend][TENSORFLOW] batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Posted by GitBox <gi...@apache.org>.
Leslie-Fang commented on issue #5978:
URL: https://github.com/apache/incubator-tvm/issues/5978#issuecomment-653250342
@FrozenGene Could you help to take a look of this issue:) Thanks
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-tvm] mikeseven commented on issue #5978: [Frontend][TENSORFLOW] batch_norm() got an unexpected keyword argument 'exponential_avg_factor'
Posted by GitBox <gi...@apache.org>.
mikeseven commented on issue #5978:
URL: https://github.com/apache/incubator-tvm/issues/5978#issuecomment-699698023
@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....
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org