microsoft / microsoft/onnxruntime

Question about quantization of batch normalization

Open
#9,938 5 comments 0 reactions 1 assignee View on GitHub

@yufenglee is already working on this.

Since Dec 8, 2021.

quantization
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 8h
Merged PRs (30d)
179

Description

Hello, Onnx runtime development team.
Let us ask the question about quantization of batch normalization.
We use onnx runtime 1.9.0, static quantization.

If we use "Network A", Batch Normalization Layer was fused to Convolution layer before quantization.
And, we could quantize fused convolution layer.
[Network A]
Convolution - Batch Normalization - Relu

But if we use "Network B", Batch Normalization Layer was not fused to Convolution layer before quantization.
As a result of quantization, the parameters of batch normalization was not qyuantized.
(We confirmed FP32 parameters of Batch Normalization after quantization.)
[Network B]
Convolution - Relu - Batch Normalization

Do you have any TIPS to quantize Batch Normalization layer?
Or, do you have plan to support quantization of Batch Normalization Layer?

Thank you for your support.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.