tensorflow / tensorflow/tflite-support

access to quantization parameters

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

@lu-wang-g is already working on this.

Since Aug 17, 2021.

Dominant language
C++
Stars
441
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Hi, I'm trying to inspect the tflite model and extract quantization parameters for each layer (min/max fp, scale, offset). It can be easily done using Netron App (all needed values are listed in INPUT->input->quantization section of layer) but I wanted to access this data from the code.

As for now I'm loading the model using tflite interpreter, I call get_tensor_details() and iterate over the obtained object. With this approach I can access the scales and zero points for all the layers (and filters), but I cannot find the min/max fp values.

So the question is - how can I access all the mentioned parameters?

Contributor guide

No contributing guide indexed for this repository

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.