更新时间:2021-03-18 GMT+08:00
分享

配置文件模板

量化支持网络单输入或多输入的场景。使用此配置文件时,可以使用配置文件模板中默认值,也可以根据实际情况将需要的参数改成合适的值。另外,配置文件中的参数分为必选参数和可选参数,必选参数您必须配置对应的参数值,可选参数您可以不配置。配置文件中各参数的含义、是否必选请参见参数配置说明

配置文件中的内容必须是使用英文格式。

网络单输入场景

输入为图片,通过OMG模型转换命令指定量化配置,配置文件举例如下。

device:USE_CPU
quantize_algo:HALF_OFFSET
weight_type:VECTOR_TYPE
bin:150
type:KL
inference_with_data_quantized:false
inference_with_weight_quantized:true
super_parameter:
{
min_percentile:PERCENTILE_HIGH
max_percentile:PERCENTILE_MID
start_ratio:0.7
end_ratio:1.3
step_ratio:0.01
}
exclude_op:'fc1000'
batch_count:50
preprocess_parameter:
{
input_type:IMAGE
image_format:BGR
input_file_path:'calibration/image_set'
mean_value:104.0
mean_value:117.0
mean_value:123.0
standard_deviation:1.0
}

网络多输入场景

第一个输入为图片,第二个输入为二进制文件,通过OMG模型转换命令指定量化配置,配置文件举例如下。

device:USE_CPU
quantize_algo:HALF_OFFSET
weight_type:VECTOR_TYPE
bin:150
type:KL
inference_with_data_quantized:false
inference_with_weight_quantized:true
super_parameter:
{
min_percentile:PERCENTILE_HIGH
max_percentile:PERCENTILE_MID
start_ratio:0.7
end_ratio:1.3
step_ratio:0.01
}
exclude_op:'fc1000'
batch_count:50
preprocess_parameter:
{
input_type:IMAGE
image_format:BGR
input_file_path:'calibration/image_set'
mean_value:104.0
mean_value:117.0
mean_value:123.0
standard_deviation:1.0
}
preprocess_parameter:
{
input_type:BINARY 
input_file_path:'calibration/img_info.bin'
}

分享:

    相关文档

    相关产品