-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Tensorflow] Question: PTQ and QAT #38
Comments
deb-intel
pushed a commit
to deb-intel/lp-opt-tool
that referenced
this issue
Nov 4, 2021
…ntel#38) * Align the OneDnn rounding mode to tensorflow int32 bias conversion. Signed-off-by: Zhang, Guoming <guoming.zhang@intel.com> * Remove the redundant parentness.
For Conv2D questions, i don't think there's need to insert additional dequantize/quantize before next QuantizedConv2DWithBiasAndRelu as this op supports s8 input. For LTSM, i remember we already supported LTSM mode since v1.6 release |
close it if no further questions |
VincyZhang
pushed a commit
that referenced
this issue
Feb 12, 2023
* fix example bugs * fix language modeling issues Co-authored-by: changwa1 <chang1.wang@intel.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, may I ask some questions based on my understanding of the source code please:
1. Conv2D
As far as I know, in post-training quantization,
Conv2D
supports bothConv2DBiasAddRelu
andConv2DBiasAddLeakyRelu
throughFuseNodeStartWithConv2d.apply_conv_biasadd_relu_fusion(...)
. However, the key difference is that with Leaky ReLU, quantized values cannot be directly passed to next quantized Conv2D due to the positive inputs constraint, soQuantizedConv2DWithBiasAndRelu
will first dequantize to pass through Leaky ReLU, and then quantize again into nextQuantizedConv2DWithBiasAndRelu
.So, if I have a quantization-aware trained model with
Conv2DBiasAddLeakyRelu
pattern, is it also converted to quantized model in the same manner? That is, regardless of the quantization method, in order to pass through Leaky ReLU, the predecessor node must first dequantize and the successor node must add a quantize input layer, is that correct?2. LSTM
I noticed the following lines:
neural-compressor/neural_compressor/adaptor/tf_utils/quantize_graph/quantize_graph_matmul.py
Lines 121 to 125 in 1bddfcb
Does this mean quantization for LSTM is currently not supported?
Thanks!
The text was updated successfully, but these errors were encountered: