question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating integer only models

See original GitHub issue

Nils 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:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
JorgeRuizDevcommented, Nov 18, 2022

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…

0reactions
StuartIanNaylorcommented, Nov 21, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found