quark.onnx.tools.save_tensor_hist

quark.onnx.tools.save_tensor_hist#

Module Contents#

Classes#

class quark.onnx.tools.save_tensor_hist.HistDataReader(model_path: str, data_path: str, input_shape: Dict[str, List[int]] = {})#

A CalibrationDataReader using random data for rapid quantiation.

get_next() Dict[str, numpy.typing.NDArray[numpy.float32]] | None#

Get next feed data :return: feed dict for the model