soiferj commented on a change in pull request #4483: [relay][op] add expand op
(from ONNX) to relay frontend
URL: https://github.com/apache/incubator-tvm/pull/4483#discussion_r358387260
##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -1081,6 +1081,16 @@ class Or(Elemwise):
def _impl_v7(cls, inputs, attr, params):
return _op.logical_or(inputs[0], inputs[1])
+class Expand(OnnxOpConverter):
+ """ Operator converter for Expand.
+ """
+
+ @classmethod
+ def _impl_v8(cls, inputs, attr, params):
+ shape_data = params[inputs[1].name_hint]
Review comment:
Can you please use something similar to `Reshape`:
```
if get_name(inputs[1]) in params:
shape_data = params[inputs[1].name_hint]
else:
shape = infer_value_simulated(inputs[1], params)
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services