Mxnet install issue with onnx

Helo , I build from source with mxnet framework here . It was success testing simeple, tensorrt with resnet18 image classification but have something issue with onnx. I try to export mxnet to onnx model using python3 like below :

import mxnet as mx
import numpy as np
from mxnet.contrib import onnx as onnx_mxnet
import logging
sym = './resnet-18-symbol.json'
params = './resnet-18-0000.params'
input_shape = (1,3,224,224)
onnx_file = './mxnet_exported_resnet50.onnx'
converted_model_path = onnx_mxnet.export_model(sym, params, 
[input_shape], np.float32, onnx_file)

And then I got issue like this :] File already exists in database: onnx/onnx-ml.proto
 [libprotobuf FATAL google/protobuf/] CHECK failed: 
 GeneratedDatabase()->Add(encoded_file_descriptor, size): 
 terminate called after throwing an instance of 
  what():  CHECK failed: GeneratedDatabase()- 
 >Add(encoded_file_descriptor, size): 
 Aborted (core dumped)

Thank you.


The script is built with MXNet v1.8.x which integrates ONNX v1.6.0.
So please make sure the same ONNX version is installed in your environment.

$ sudo pip3 install onnx==1.6.0


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.