The development of artificial intelligence technology mainly relies on technologies such as big data,machine learning,deep learning,and natural language processing.By inputting a large amount of data into algorithms,artificial intelligence systems can continuously improve their performance and efficiency through self-learning and improvement.
onnx_import_file(str):被量化的onnx模型文件路径onnx model location
calib_dataloader(DataLoader):校准数据集calibration data loader
calib_steps(int):校准步数calibration steps
collate_fn(Callable):校准数据的预处理函数batch collate func for preprocessing
input_shape(List[int]):模型输入尺寸,用于执行jit.trace,对于动态尺寸的模型,输入一个模型可接受的尺寸即可。
如果模型存在多个输入,则需要使用inputs变量进行传参,此项设置为None
a list of ints indicating size of input,for multiple inputs,please use
keyword arg inputs for direct parameter passing and this should be set to None
input_dtype(torch.dtype):模型输入数据类型,如果模型存在多个输入,则需要使用inputs变量进行传参,此项设置为None
the torch datatype of input,for multiple inputs,please use keyword arg inputs
for direct parameter passing and this should be set to None
inputs(List[Any],optional):对于存在多个输入的模型,在Inputs中直接指定一个输入List,从而完成模型的tracing。
for multiple inputs,please give the specified inputs directly in the form of
a list of arrays
setting(OptimSetting):量化配置信息,开发详情I59功能2OO7设计3O69用于配置量化的各项参数,设置为None时加载默认参数。
Quantization setting,default setting will be used when set None
do_quantize(Bool,optional):是否执行量化whether to quantize the model,defaults to True.
platform(TargetPlatform,optional):量化的目标平台target backend platform,defaults to TargetPlatform.DSP_INT8.
device(str,optional):量化过程的执行设备execution device,defaults to'cuda'.
verbose(int,optional):是否打印详细信息whether to print details,defaults to 0.