Mxnet Export onnx Symbol and params files provided are invalid

Invalid parameter file name.

import mxnet as mx
import numpy as np
import sys
import os
import argparse
import onnx
 
print('mxnet version:', mx.__version__)
print('onnx version:', onnx.__version__)
 
from mxnet.contrib import onnx as onnx_mxnet
 
from onnx import checker
 
 
syms   = './mnist-symbol.json'
params = './mnist-0000.params'
 
input_shape = (1,3,112,112)
 
onnx_file = './mnist.onnx'
 
# Invoke export model API. It returns path of the converted onnx model
converted_model_path = onnx_mxnet.export_model(syms, params, [input_shape], np.float32, onnx_file)

Finally, it is found that the parameter file name is wrongly written, “-” and “” I don’t know.

Read More: