Open hgaiser opened 6 days ago
Hi @hgaiser, you will have to do P2TE QAT: https://pytorch.org/tutorials/prototype/pt2e_quant_qat.html and then combine it with our documentation on that. If you already have a QAT model, you can convert using the original TFLite flags: https://www.tensorflow.org/model_optimization/guide/quantization/training_example#create_quantized_model_for_tflite_backend
Description of the bug:
I am trying to run the following:
Actual vs expected behavior:
I was expecting ai-edge-torch to convert the quantized model to a tflite model, but instead I get the following error:
Any other information you'd like to share?
I am unsure if my approach is correct. My main goal is to get a quantized model for running on an edge device. I find many different resources for quantizing models. The recommended approach appears to be quantization aware training, but I see multiple methods to do that.
Is the approach I'm taking not supported? If so, what is the recommended approach?
I am aware of the Quantization documentation, but this is for post training quantization. For better accuracy it seems recommended to use QAT.