]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - jacinto-ai/pytorch-jacinto-ai-devkit.git/commitdiff
release commit
authorManu Mathew <a0393608@ti.com>
Fri, 24 Jan 2020 05:36:08 +0000 (11:06 +0530)
committerManu Mathew <a0393608@ti.com>
Fri, 24 Jan 2020 05:36:08 +0000 (11:06 +0530)
docs/Quantization.md

index 70ff6fea179dc37c99837d6074f6911fcc5a9c77..e832685b12327a730dfb00b248f9a39ada4ec91e 100644 (file)
@@ -5,12 +5,12 @@ Quantization of a CNN model is the process of converting floating point data & o
 Accuracy of inference can degrade if the CNN model is quantized to 8bits using simple methods and steps have to be taken to minimize this accuracy loss. The parameters of the model need to be adjusted to suit quantization. This includes adjusting of weights, biases and activation ranges. This adjustment can be done as part of the Calibration or as part of Quantization Aware Training.
 
 ## Overview
-TI Deep Learning Library (TIDL) is a highly optimized runtime for Deep Learning Models on TI’s Jacinto7 TDA4x Devices (eg. TDA4VM). TIDL supports two kinds of Quantization schemes: (1) Post Training Calibration & Quantization, (2) Quantization Aware Training.<br>
+TI Deep Learning Library (TIDL) is a highly optimized runtime for Deep Learning Models on TI’s Jacinto7 TDA4x Devices (eg. TDA4VM). TIDL supports two kinds of Quantization schemes:
 - Post Training Calibration & Quantization (Calibration): TIDL can accept a floating point model and Calibrate it with a few sample images. The Calibration is done during the import of the model. The current Calibration scheme is fairly simple  but there are plans to improve it substantially.<br>
 - Quantization Aware Training (QAT): This is needed if accuracy obtained with Calibration is not satisfactory (eg. Quantization Accuracy Drop >2%). QAT operates as a second phase after the initial training in floating point is done. We have provide this PyTorch Jacinto AI DevKit to enable QAT with PyTorch. There also a plan to make TensorFlow Jacinto AI DevKit available. Further Details are available at: [https://github.com/TexasInstruments/jacinto-ai-devkit](https://github.com/TexasInstruments/jacinto-ai-devkit)<br>
 
-## PACT2 activation function
-In order to make the activations quantization friendly, it is important to clip them during Quantization Aware Training. PACT2 activation function has been developed to clip the activations to a power-of-two value. PACT2 can be used in the place of commonly used activation functions such as ReLU or ReLU6. Our Quantization Aware Training method will automatically insert PACT2 activation functions wherver necessary to constraint the ranges of activations. The following is a block diagram of the PACT2:
+###### PACT2 activation function
+In order to make the activations quantization friendly, it is important to clip them during Quantization Aware Training. PACT2 activation function has been developed to clip the activations to a power-of-two value. PACT2 is used in the place of commonly used activation functions such as ReLU or ReLU6. Our Quantization Aware Training modules/scripts will automatically insert PACT2 activation functions wherever necessary to constraint the ranges of activations. The following is a block diagram of the PACT2:
 <p float="left"> <img src="quantization/pact2_activation.png" width="640" hspace="5"/> </p>
 We use statistical range clipping in PACT2 to improve the Quantized Accuracy (compared to simple min-max range clipping).