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
There is a bug in onnx frontend I think.
When I using onnx model which has a flatten op with axis attribute and the value is 1.
And then I run relay.frontend.from_onnx , it will occur a issue :
batch_flatten() got an unexpected keyword argument 'axis'
So I modify the source code in .../relay/op/nn/nn.py - line 429.
Change
defbatch_flatten(data):
to
defbatch_flatten(data, axis=1):
And it works but obviously this is a temporary solution.
I see this pull request #2843 had renamed 'Flatten' to 'batch_flatten'.
Although flatten with default axis 1 is just same as batch_flatten but I think this behavior should be regulated. Probably we can use reshape op to replace flatten and don't rename flatten :
Thanks for bringing this up, we can do an optional conversion(convert to batch_flatten when it matches, use reshape otherwise) We can also enhance batch_flatten. Contribution is welcomed!
There is a bug in onnx frontend I think.
When I using onnx model which has a flatten op with axis attribute and the value is 1.
And then I run
relay.frontend.from_onnx
, it will occur a issue :So I modify the source code in
.../relay/op/nn/nn.py - line 429
.Change
to
And it works but obviously this is a temporary solution.
I see this pull request #2843 had renamed 'Flatten' to 'batch_flatten'.
Although flatten with default axis 1 is just same as batch_flatten but I think this behavior should be regulated. Probably we can use reshape op to replace flatten and don't rename flatten :
It can work but I'm not sure it is suitable.
The text was updated successfully, but these errors were encountered: