tensorflow / tensorflow/model-optimization

layer is not supported for Quantization aware training

Open
#602 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

System information

  • TensorFlow version (you are using): tensorflow-2.3.0
  • Are you willing to contribute it (Yes/No):No

RuntimeError: Layer tf_op_layer_ResizeNearestNeighbor:<class 'tensorflow.python.keras.engine.base_layer.TensorFlowOpLayer'> is not supported. You can quantize this layer by passing a tfmot.quantization.keras.QuantizeConfig instance to the quantize_annotate_layer API.
RuntimeError: Layer up_sampling2d:<class 'tensorflow.python.keras.layers.convolutional.UpSampling2D'> is not supported. You can quantize this layer by passing a tfmot.quantization.keras.QuantizeConfig instance to the quantize_annotate_layer API.

RuntimeError: Layer conv2d_transpose:<class 'tensorflow.python.keras.layers.convolutional.Conv2DTranspose'> is not supported. You can quantize this layer by passing a tfmot.quantization.keras.QuantizeConfig instance to the quantize_annotate_layer API.

May i ask what's the plan for the support of tf_op_layer_ResizeNearestNeighbor、UpSampling2D and Conv2DTranspose?

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.

Research direction

Start at the tfmot.quantization.keras.quantize_annotate_layer API and examine how ResizeNearestNeighbor, UpSampling2D, and Conv2DTranspose are handled. Define the support scope and verify that quantization-aware training accepts the requested layers without the reported RuntimeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
keras, python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.