Open k8280627 opened 4 years ago
Hi @tombstone @jch1 @pkulzc,
I noticed that the uint8 mobile.tflite
in this link is properly quantized, as in the FakeQuantWithMinMaxVars
that comes from ReLU6
have the min and max range within 0-6.
I was wondering, is this model.tflite
quantized by quantization aware training (QAT) or post training quantization? If it's QAT, then could you let me know if there is any specific setting that I'd have to set or if there's anything that I might miss out?
Another question is, for the quantization of the convolutional layer, is it per-tensor or per-axis quantization? Is there any option that I can force it to do per-tensor quantization, either with QAT of post training quantization?
Thank you very much for your help!! Really appreciate it very much! If you need additional information, please let me know as I'd love to solve this issue as soon as possible 😄
Hi @tombstone @jch1 @pkulzc,
just wanted to bump this up and see if there's any update on this issue. Please let me know if you need additional information.
Prerequisites
Please answer the following questions for yourself before submitting an issue.
1. The entire URL of the file you are using
https://github.com/tensorflow/models/tree/master/research/object_detection
2. Describe the bug
I trained SSD+Mobiledet DSP model on a custom dataset, and did quantization aware training for 17K steps. However, when I exported the model to frozen graph using
export_tflite_ssd_graph.py
, theFakeQuantWithMinMaxVars
that comes fromReLU6
have min and max range larger than 0-6.https://github.com/tensorflow/models/issues/6112 this issue describes the similar issue, but it's not answered.
3. Steps to reproduce
export_tflite_ssd_graph.py
.4. Expected behavior
The tflite graph would contain
FakeQuantWithMinMaxVars
that comes fromReLU6
that have min and max range larger than 0-6.5. Additional context
6. System information