tensorflow / tensorflow/model-optimization

Set zero_debias=True for Quantization Aware Training

Open
#863 3 comments 0 reactions 1 assignee View on GitHub

@Xhark is already working on this.

Since Oct 12, 2021.

Dominant language
Python
Stars
1.6k
Forks
349
Avg merge
3d 2h
Merged PRs (30d)
1

Description

Hi,
I see that TF version 1's QAT library uses zero_debias as True. However, the TFMOT's quantization library calls the following in the quant_ops.py:

assign_min = moving_averages.assign_moving_average(
min_var, range_min, ema_decay, zero_debias=False, name='AssignMinEma')
assign_max = moving_averages.assign_moving_average(
max_var, range_max, ema_decay, zero_debias=False, name='AssignMaxEma')

When I set the zero_debias to be True, I hit this error:

Tensor.op is meaningless when eager execution is enabled.

Do you have plans in the future to support zero_debias=True for QAT ?

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.