onnx / tutorials

Tutorials for creating and using ONNX models
Apache License 2.0
3.4k stars 631 forks source link

MXNet to onnx error #227

Open hos3ein opened 3 years ago

hos3ein commented 3 years ago

how to fix this error?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\envs\mxnet-env\lib\site-packages\mxnet\contrib\onnx\mx2onnx\export_model.py", line 83, in export_model
    verbose=verbose)
  File "C:\ProgramData\Anaconda3\envs\mxnet-env\lib\site-packages\mxnet\contrib\onnx\mx2onnx\export_onnx.py", line 312, in create_onnx_graph_proto
    checker.check_graph(graph)
  File "C:\ProgramData\Anaconda3\envs\mxnet-env\lib\site-packages\onnx\checker.py", line 58, in checker
    proto.SerializeToString(), ctx)
onnx.onnx_cpp2py_export.checker.ValidationError: Unrecognized attribute: spatial for operator BatchNormalization

==> Context: Bad node spec: input: "conv_1_conv2d" input: "conv_1_batchnorm_gamma" input: "conv_1_batchnorm_beta" input: "conv_1_batchnorm_moving_mean" input: "conv_1_batchnorm_moving_var" output: "conv_1_batchnorm" name: "conv_1_batchnorm" op_type: "BatchNormalization" attribute { name: "epsilon" f: 0.001 type: FLOAT } attribute { name: "momentum" f: 0.9 type: FLOAT } attribute { name: "spatial" i: 0 type: INT }
...