caffe-jacinto
caffe-jacinto copied to clipboard
how to use quantization
where can I find quantization scripts for model inference? thanks
The inference script is here: https://github.com/tidsp/caffe-jacinto-models/blob/caffe-0.17/scripts/infer_cityscapes_segmentation.sh
Example prototxts with quantization are in: trained/image_segmentation/cityscapes5_jsegnet21v2/test_quantize
All you have to do is add quantize: true to your prototxt file.
Not that this is a simulation of qunatization to measure the accuracy with quantization and not the actual fixed point inference.
You may also want to merge the batch norm weights to convolution weights using caffe optimize command before running the inference with quantization.