neural_compressor.experimental.export.utils

Utility functions to export model from PyTorch/TensorFlow to ONNX.

Module Contents

Classes

DummyDataReader

Build dummy datareader for onnx static quantization.

Functions

ONNX2Numpy_dtype(onnx_node_type)

Get Numpy data type from onnx data type.

neural_compressor.experimental.export.utils.ONNX2Numpy_dtype(onnx_node_type)

Get Numpy data type from onnx data type.

Parameters:

onnx_node_type (str) – data type description.

Returns:

numpy data type

Return type:

dtype

class neural_compressor.experimental.export.utils.DummyDataReader(fp32_onnx_path)

Bases: ortq

Build dummy datareader for onnx static quantization.

get_next()

Generate next data.