Creating integer only models
See original GitHub issueNils is it possible to create an integer only models so this could run on accelerators or frameworks such as ArmNN? https://www.tensorflow.org/lite/performance/post_training_quantization#full_integer_quantization
I always get confused at how to implement the representative_dataset()?
import tensorflow as tf
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.representative_dataset = representative_dataset
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS_INT8]
converter.inference_input_type = tf.int8 # or tf.uint8
converter.inference_output_type = tf.int8 # or tf.uint8
tflite_quant_model = converter.convert()
Has anyone done this and got an example or even better the tflite models?
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
The Integer Variable: Application in Modeling - River Logic
Learn how to overcome the complexities of mixed integer variable modeling with Enterprise Optimizer.
Read more >How to Start Modeling with Integer Programming
Roughly speaking, we can define three main pillars that hold an integer programming model: (i) a set of variables, (ii) some constraints and...
Read more >IntegerField - Django Models - GeeksforGeeks
IntegerField is used for storing a integer number represented in Python by a int instance. To know more about int, visit Python |...
Read more >Create django model with as many fields as an integer in ...
Create django model with as many fields as an integer in other field ; params(models.Model): name = models.CharField(max_length=30 ; 'no_name') ...
Read more >Integer Programming
Second, we consider basic approaches that have been developed for solving integer and mixed-integer programming problems. 9.1 SOME INTEGER-PROGRAMMING MODELS.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A few months ago I managed to quantize this LSTM model and run it on a Coral Edge TPU https://colab.research.google.com/github/google-coral/tutorials/blob/master/train_lstm_timeseries_ptq_tf2.ipynb
The example has been broken since TF 2.7…
Yeah its confusing as post-training quantization of recurrent layers does seem to be broken, dunno.