You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/08/10 05:33:19 UTC
[GitHub] [incubator-mxnet] Lebron8997 commented on issue #14589: convert
from mxnet to onnx failed,
with Unrecognized attribute: spatial for operator BatchNormalization
Lebron8997 commented on issue #14589: convert from mxnet to onnx failed, with Unrecognized attribute: spatial for operator BatchNormalization
URL: https://github.com/apache/incubator-mxnet/issues/14589#issuecomment-520120056
@mxnet-label-bot
My onnx 1.5.0 (latest)
For batchnorm, I revised script mxnet/contrib/mx2onnx/_op_translations.py as follows:
1, on line 647: kernel = eval(attrs["kernel"]) if attrs.get("kernel") else None
This is needed for global pooling like:
x = mx.symbol.Pooling(data=data,
pool_type='avg',
global_pool=True,
name=name+'pool')
2, delete line 359: spatial=0
This line is not supported for onnx > 1.3.0
It works for me tranlate .params and json to onnx, but this failed me for inference in tensorRT 5.1.5. It should be another problem though I'm not sure about that.
----------------------------------------------------------------
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
With regards,
Apache Git Services