tensorflow / tensorflow/model-optimization
Add batch norm to default_n_bit_quantize_registry and default_8_bit_quantize_registry
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 349
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
- TensorFlow version (you are using): 2.13
Motivation
There are many models which use batch norm in places where it is not covered by the existing cases allowed in the registry.
Adding batch norm to the registry would allow users to apply QAT to such models.
At present I am editing both registries by adding the line
_QuantizeInfo(layers.BatchNormalization, ['gamma'], [], True),
which works for my case, but it would be nice to have a more general fix
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate default_n_bit_quantize_registry and default_8_bit_quantize_registry, then review the existing registry entries around them. Add BatchNormalization support as described in the issue and verify that both registries accept the intended batch-normalization case without breaking their existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- keras, python, tensorflow
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100