tensorflow / tensorflow/model-optimization

Quantization Aware Training support for KerasLayer

Open
#786 0 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: latest

Motivation

Trying to combine Quantization Aware Training with transfer learning.
I am using feature vectors from tfhub, so when I download the feature vector it comes as a hub.KerasLayer.
following this tutorial https://www.tensorflow.org/model_optimization/guide/combine/cqat_example, Clustering is working well on the model but when it comes to QAT there is always an error that the layer is not supported. Is there any workaround or plan for support?

As examples:

Model architecture that I am trying to use
image
Just for reference, the KerasLayer is the feature vector of MobileNet V2
Error when trying QAT
image

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 by reproducing the Quantization Aware Training tutorial linked in the issue with the MobileNet V2 tfhub.KerasLayer and inspect the reported unsupported-layer error. The issue names no repository files or tests; done would require a defined support path or documented workaround for applying QAT to KerasLayer-based transfer-learning models.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.