Tensorflow hub package for TFLite 2.1 quantized models

@tqchen

I am adding support for TFLite 2.1 quantized models. Unfortunately, there are no hosted models that we can download.

We can use the TFLite API to quantize the model, but it needs tensorflow hub package to pull the original FP32 models. The code is present in this PR - https://github.com/apache/incubator-tvm/pull/5848

I was wondering if it is ok to add that dependency. If thats not the right way, I can put the quantized models in the TVM data repo. Please let me know.

cc @ramana-arm

Just a gentle ping to get a decision on this :slight_smile: @tqchen

Gentle ping … @tqchen

let us put the model into data folder. to reduce the complexity, we can also consider to trim the model a bit

Just to confirm. By data folder, do you mean this repo - https://github.com/dmlc/web-data/tree/master/tensorflow?

Yes, I will only submit the tflite files. For now, I test 5 models. We can cut to 3 for decent coverage - resnet, inception_v1 and mobilenet_v2. Following are the sizes

26M Jun 21 18:49 /tmp/resnet_50_full_integer_except_io.tflite
4.4M Jun 22 02:38 /tmp/mobilenet_v1_full_integer_except_io.tflite
3.9M Jun 22 03:13 /tmp/mobilenet_v2_full_integer_except_io.tflite
6.6M Jun 22 03:33 /tmp/inception_v1_full_integer_except_io.tflite
24M Jun 22 07:03 /tmp/inception_v3_full_integer_except_io.tflite

Yes that works, as long as we have a good persistent location to download it is fine

1 Like

@tqchen Added the PR - https://github.com/dmlc/web-data/pull/257