|
为什么混合量化时,将所有层的量化类型设为float32得到的rknn模型大小还是原模型的一半
用dynamic_fixed_point-i16和float32设置的层得到的rknn模型大小一样,如下图
原模型weight格式是34.8MB
所有层float32和dynamic_fixed_point-i16得到的大小一样都是17.4MB,这点搞不懂
# add layer name and corresponding quantized_dtype to customized_quantize_layers, e.g conv2_3: float32)
customized_quantize_layers: {
convolution_1: dynamic_fixed_point-i16,
leakyrelu_3: dynamic_fixed_point-i16,
pooling_4: dynamic_fixed_point-i16,
convolution_5: dynamic_fixed_point-i16,
leakyrelu_7: dynamic_fixed_point-i16,
pooling_8: dynamic_fixed_point-i16,
convolution_9: dynamic_fixed_point-i16,
leakyrelu_11: dynamic_fixed_point-i16,
pooling_12: dynamic_fixed_point-i16,
convolution_13: dynamic_fixed_point-i16,
leakyrelu_15: dynamic_fixed_point-i16,
pooling_16: dynamic_fixed_point-i16,
convolution_17: dynamic_fixed_point-i16,
leakyrelu_19: dynamic_fixed_point-i16,
pooling_20: dynamic_fixed_point-i16,
convolution_21: dynamic_fixed_point-i16,
leakyrelu_23: dynamic_fixed_point-i16,
pooling_24: dynamic_fixed_point-i16,
convolution_25: dynamic_fixed_point-i16,
leakyrelu_27: dynamic_fixed_point-i16,
convolution_28: dynamic_fixed_point-i16,
leakyrelu_30: dynamic_fixed_point-i16,
convolution_37: dynamic_fixed_point-i16,
convolution_31: dynamic_fixed_point-i16,
leakyrelu_39: dynamic_fixed_point-i16,
upsampling_40: dynamic_fixed_point-i16,
leakyrelu_33: dynamic_fixed_point-i16,
concat_41: dynamic_fixed_point-i16,
convolution_34: dynamic_fixed_point-i16,
convolution_42: dynamic_fixed_point-i16,
leakyrelu_44: dynamic_fixed_point-i16,
convolution_45: dynamic_fixed_point-i16
}
# add layer name and corresponding quantized_dtype to customized_quantize_layers, e.g conv2_3: float32
customized_quantize_layers: {
convolution_1: float32),
leakyrelu_3: float32),
pooling_4: float32),
convolution_5: float32),
leakyrelu_7: float32),
pooling_8: float32),
convolution_9: float32),
leakyrelu_11: float32),
pooling_12: float32),
convolution_13: float32),
leakyrelu_15: float32),
pooling_16: float32),
convolution_17: float32),
leakyrelu_19: float32),
pooling_20: float32),
convolution_21: float32),
leakyrelu_23: float32),
pooling_24: float32),
convolution_25: float32),
leakyrelu_27: float32),
convolution_28: float32),
leakyrelu_30: float32),
convolution_37: float32),
convolution_31: float32),
leakyrelu_39: float32),
upsampling_40: float32),
leakyrelu_33: float32),
concat_41: float32),
convolution_34: float32),
convolution_42: float32),
leakyrelu_44: float32),
convolution_45: float32)
}
|
|