tensorflow / tensorflow/models

Incorrect quantized SSD mobiledet DSP model after quantization aware training

Open
#8,726 2 comments 0 reactions 3 assignees View on GitHub

@pkulzc is already working on this.

Since Jun 24, 2020.

models:research:odapi type:bug
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/object_detection

2. Describe the bug

I trained SSD+Mobiledet DSP model on a custom dataset, and did quantization aware training for 17K steps. However, when I exported the model to frozen graph using export_tflite_ssd_graph.py, the FakeQuantWithMinMaxVars that comes from ReLU6 have min and max range larger than 0-6.

https://github.com/tensorflow/models/issues/6112 this issue describes the similar issue, but it's not answered.

3. Steps to reproduce

  1. train SSD+mobiledet DSP, with pretrained weights stored in this link as fine-tune checkpoint:http://download.tensorflow.org/models/object_detection/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19.tar.gz.
  2. perform quantization aware training with the trained SSD+mobiledet DSP model as fine-tune checkpoint.
  3. export the tflite graph using export_tflite_ssd_graph.py.

4. Expected behavior

The tflite graph would contain FakeQuantWithMinMaxVars that comes from ReLU6 that have min and max range larger than 0-6.

5. Additional context

6. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Mobile device name if the issue happens on a mobile device:
  • TensorFlow installed from (source or binary): pip install
  • TensorFlow version (use command below): 1.15
  • Python version: 3.7
  • Bazel version (if compiling from source):
  • GCC/Compiler version (if compiling from source):
  • CUDA/cuDNN version: 10.0.130
  • GPU model and memory: Nvdia GeForce RTX 2080

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.