Initial the int8 quantize inference implement #487
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ncnn-int8 pull request readme
Int8 inference support layer
Summary change files
How to generate the Calibration table file
We provide a tool for generating the Int8 calibration table file:
caffe-int8-convert-tools
How to use Int8 inference
In the default set, the inference using the Float32 mode,If you want switch the inference to Int8 mode,just need add 2 lines code,more details please see the examples/squeezenet-int8.cpp file.
Attention above codes,the sequence of calling API must be the same !!!
How to manual control the int8 conv layer on/off
This implement is naive and ugly,need modify the ncnn.param file by manual.
Editor the ncnn.param,add the paramter in the conv layer "7=1"or in the deconv layer "8=1",the default value is "0" ,the int8 conv default enable.
Result Accuracy
Result Performance
TODO
Thanks
The original author of the int8 code : fu1899
The original author of the algorithm code : JansonZhu