class importer.OnnxLoader(model)

Translates a Onnx model to Acuity formats.

__init__(model)
Parameters:

model – The file path of the imported Onnx model file, a .onnx file.

load(inputs=None, input_size_list=None, input_dtype_list=None, outputs=None, remove_io_perm=False)

Load Onnx model.

Parameters:
  • inputs – Specify the input points of the TFLite graph, requries list type. Such as [‘input_point_1’, ‘input_point_2’]. When this argument is omitted, Acuity uses all header points of this model.

  • input_size_list – The tensor shape sizes of the input points listed in the inputs argument, requires list type. For example, [[1,3,224,224],[1,12,1]], which represents the tensor shape sizes of two input points.

  • input_dtype_list – Specify the data type of input tensors if it is not float type, requires list type. For example, [‘float’, ‘int8’].

  • outputs – Specify the output points of the Onnx graph, requries list type. For example, [‘output_point_1’, ‘output_point_2’]. When this argument is omitted, Acuity uses all tail points of this model.

Returns:

Acuity network.