google / google/qkeras

How can I get the scale of the QAdaptiveActivation layer

Open
#114 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
584
Forks
108
PR merge metrics
No merged PRs in 30d

Description

![1676141811840](https://user-images.githubusercontent.com/45109782/218276151-41f3175a-31e9-499a-b52e-3d66c81821e5.png)
As shown in the comment, the QAdaptiveActivation layer can be used to calculate the EMA of min and max of the activation values, i.e., the quantization range of the activations tensor.
After we have the quantization range and the number of quantization levels (e.g., 256 for INT8), we can get the scale.
However, I did not find the **_scale_** attribute in the QAdaptiveActivation layer.

So how can I get the **_scale_** of the QAdaptiveActivation layer?

Contributor guide

Open the contributing guide

Research direction

Start by locating the QAdaptiveActivation layer implementation and reviewing how it tracks the EMA-based activation range and quantization levels. Determine how the layer’s scale should be exposed or retrieved, and verify that the resulting behavior is documented or covered by the project’s existing checks.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.