tensorflow / tensorflow/models
EdgeTPU-DeepLab models Quantization
@gpapan is already working on this.
Since Jun 15, 2020.
- Dominant language
- Python
- Stars
- 77.7k
- Forks
- 44.8k
- PR merge metrics
- No merged PRs in 30d
Description
I have trouble with quantizing the provided EdgeTPU-DeepLab models (from model_zoo.md / EdgeTPU-DeepLab models on Cityscapes) and compiling them for inference on the EdgeTPU:
For Quantizing, I tried:
converter = tf.compat.v1.lite.TFLiteConverter.from_frozen_graph(frozen_inference_graph.pb, ['MobilenetEdgeTPU/MobilenetEdgeTPU/input'], ['ArgMax'])
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.representative_dataset = representative_dataset_gen
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
converter.inference_input_type = tf.uint8
converter.inference_output_type = tf.uint8
tflite_quant_model = converter.convert()
using the latest tf-nightly '2.3.0-dev20200612', which outputs a quantized tflite-file.
When then compiling the model for the edgetpu, the edgetpu_compiler (version 2.1.302470888) just gives the cryptic error message "Internal compiler error. Aborting!"
Could you provide help on how to convert the EdgeTPU-DeepLab models for usage on the EdgeTPU ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.