Questions tagged [quantization]

Use this tag for questions related to quantization of any kind, such as vector quantization.

Quantization, in mathematics and digital signal processing, is the process of mapping a large set of input values to a (countable) smaller set.

For more, please read the Wikipedia article for more.

444 questions
0
votes
1 answer

Algorithm to turns a continues signal into binary

I had a nice project in mind, which I will probably not going to do because of a lack of time, but I had some theoretical problem I faced there, which still bother me and might be interesting for you too. I have a data from an animal, which moves in…
Shaq
  • 303
  • 1
  • 10
0
votes
1 answer

Quantization for object detection

How quantization for object detection models varies from that of classification models? Since detection models need to handle the bbox coordinates(multiple objects in an input),there must be some scaling trick in quantization.
0
votes
1 answer

TFLite Interpreter fails to load quantized model on Android

I have a TFLite model. The model input is a 256x192 image, it is quantized to 16 bit. It was quantized with this converter: converter.optimizations = [tf.lite.Optimize.DEFAULT] converter.target_spec.supported_types = [tf.float16] tflite_model =…
jonb
  • 845
  • 1
  • 13
  • 36
0
votes
1 answer

How does bias work in pytorch quantized convolution?

I'm trying to perform static post-train quantization in PyTorch. For this example, I tried quantizing a Conv2d layer with a bias: def quantize(model, input_shape): with torch.no_grad(): # model = tq.QuantWrapper(model) observer =…
0
votes
1 answer

create_training_graph() failed when converted MobileFacenet to quantize-aware model with TF-lite

I am trying to quantize MobileFacenet (code from sirius-ai) according to the suggestion and I think I met the same issue as this one When I add tf.contrib.quantize.create_training_graph() into training graph (train_nets.py ln.187: before train_op =…
0
votes
0 answers

how to convert a 32-bit operation to a 4-bit or 8-bit operation on cpu?

To the best of my knowledge, the existing quantization method is operating on 32-bit. In order to quantize weight of CNN as well as reduce memory footprint and then port the quantized model into the mobile device, how to convert a 32-bit operation…
0
votes
0 answers

mobilenetv1 trained with custom dataset Quantization Size problem

I am working on an object detection software, basically i am using TensorFlow objet detection API on Python with MobileNetV1, i have trained the model with my own dataset. The frozen_inference_graph.pb file resulting of the training with my dataset…
0
votes
1 answer

Does Tensorflows quantization aware training lead to an actual speedup during training?

we are looking into using quantization aware training for a research project to determine the impact of quantization during training on convergence rates an runtimes. We are though not yet fully convinced that this is the right tool. Could you…
0
votes
1 answer

std.constant' op requires attribute's type to match op's return type

I'm trying to convert a keras model which I trained and fine tuned with quantization aware training tutorial on their official website to a int tflite model. I am able to follow their steps until I have to convert the model to tflite format. Then it…
0
votes
0 answers

Color Quantization - Popularity Alogirthm

I am supposed to write an algorithm responsible for Color Quantization that uses the Popularity Algorithm method. However I couldn't find any good explanation of. So the steps as I understand are as follows: Getting K most frequently occurring…
user8467047
0
votes
0 answers

Quantization converterError 2471 Check failed: status.ok()

Environment: tensorflow=2.0, tensorflow-model-optimization=0.3.0, python=3.6.8 when convert keras model to tflite through below code: m1='ownmodel_pruW.h5' model=tf.keras.models.load_model(m1) tflite_model_file = 'ownnet.tflite' converter =…
0
votes
2 answers

Use .tflite with iOS and GPU

I have created a new tflite model based on MobilenetV2. It works well without quantization using CPU on iOS. I should say that TensorFlow team did a great job, many thanks. Unfortunately there is a problem with latency. I use iPhone5s to test my…
0
votes
0 answers

Dumping Weights in TensorflowLite

new Tensorflow 2.0 user. My project requires me to investigate the weights for the neural network i created in Tensorflow (super simple one). I think I know how to do it in the regular Tensorflow case. Namely I use the command…
0
votes
0 answers

Understanding Tensorflow Object Detection UINT8 Quantization Command

I tried to quantize model trained using object detection api and it successfuly worked following google document. To convert frozen graph to quantized UINT8 tflite file, I used command tflite_convert \ …
0
votes
1 answer

Quantization scheme for Convolutional Neural Network 8-bit quantization in tensorflow

Tensorflow code for quantization From all the papars i have reffered for CNN quantization the quantization scheme is stated as step size = range/255 for 8-bit here range = xmax-xmin but as shown in the image in the tensorflow implementation range…