caffe-jacinto icon indicating copy to clipboard operation
caffe-jacinto copied to clipboard

how to use quantization

Open ghost opened this issue 6 years ago • 2 comments

where can I find quantization scripts for model inference? thanks

ghost avatar Nov 18 '18 13:11 ghost

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.

mathmanu avatar Nov 19 '18 05:11 mathmanu

You may also want to merge the batch norm weights to convolution weights using caffe optimize command before running the inference with quantization.

mathmanu avatar Nov 19 '18 05:11 mathmanu