Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
themeConfluence
titleImport ONNX to Symbolic Interface
def mxnet.contrib.onnx.import_model(model_file):
	"""
	Imports the ONNX model file, passed as a parameter, into MXNet symbol and parameters. Operator support and coverage - https://cwiki.apache.org/confluence/display/MXNET/ONNX
	Input Parameters –
	----------
	model_file – 
		A string object representing the path to the ONNX model file.
	
	Return type –
	----------
	sym – 
		An mxnet symbol object representing the symbolic graph of the given model.
	arg_params -  
		A dictionary object mapping the parameter name to an mxnet ndarray object representing its tensor value. These are the parameter values that are learned while training the model.
	aux_params – 
		A dictionary object mapping parameter names to an mxnet ndarray object representing the tensor values of the parameters. It stores the values that are not learned during the training process.
	"""
	...
	return sym, arg_params, aux_params

...

Import ONNX model files into Gluon Symbolic block

Given an ONNX model file import the model into Gluon’s SymbolicBlock object.

Code Block
languagepy
titleImport ONNX to Imperative Gluon Interface
def mxnet.contrib.onnx.import_to_gluon(model_file):
	"""
	Imports the ONNX model files, passed as a parameter, into Gluon’s SymbolicBlock object.
	Input Parameters –
	----------
	model_file – 
		A string object representing the path to the ONNX model file.
	Return Type –
	----------
	sym_block – 
		A SymbloicBlock object representing the given model file.
	"""
	...
	return sym_block

...

Model Metadata for a given ONNX model file

Given an ONNX model file, the user can use this API to fetch the related metadata of the model. This is a request from customers and users of the ONNX module, where they had a use case for knowing the shape information of the input and output tensors of a given ONNX model. This API is being implemented to meet that request.

...