Hi TI members:
I use tensorflow to do quantization aware training and convert it to tflite model with int8 format. And I want to import the tflite model to TIDL execution.
Version info:
TIDL: tidl_j7_02_00_00_07
I have two questions:
1. Can I use 16 bit to quantize bias in TIDL_importQuantLayerParams() and use 16 bit to do TIDL_conv2dBiasSplit() ?
tflite use int32 to store bias of convolution layer.
In phase of TIDL importer, TIDL_importQuantLayerParams() use 8 bit to quantize bias (but use int16 to store it?) and it cause some precision loss.
In phase of TIDL inference, TIDL_conv2DInit() use int8 bias to do TIDL_conv2dBiasSplit(). But ref implementation of TIDL_refConv2dProcess() use int16 biasPtr to do TIDL_conv2dBiasSplit().
Does TIDL_conv2dMMAProcess() also use int16 bias to do TIDL_conv2dBiasSplit()? (I can not find implementation code of TIDL_conv2dMMAProcess)
Can I use 16 bit to quantize bias in TIDL_importQuantLayerParams() and use 16 bit to do TIDL_conv2dBiasSplit() when run on EVM?
2. How can I enable per-channel weights quantization?
tflite use per-channel weights quantization by default. TIDL support per-channel weights quantization only the case: (numGroups == numInChannels == numOutChannels).
I try to modify some codes both of TIDL importer and TIDL inference modules, and get good results when run PC_dsp_test_dl_algo.out.
I use the generated net.bin and params.bin to run the model on EVM, the results is bad. I think that it's because of the conv kernel do not support per-channel weights quantization.
How can I enable per-channel weights quantization of conv kernel?
Thanks.
YouJun Shih