arsdragonfly 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-523773367
 
 
   > @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.
   
   Did you run into [this](https://github.com/microsoft/onnxruntime/pull/890) ? 
Have you solved it?

----------------------------------------------------------------
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

Reply via email to