5

I built my first covnet using the process described in this colab. Now I would like to run the model on Googles shiny new edge tpu.

But according to the Model Requirments described here, I need to use quantization-aware training (post-training quantization is not supported). to be able to convert the model into a format that I can use on the EdgeTPU.

How do I modify the example colab to do this quantization-aware training thing?

DrkStr
  • 1,752
  • 5
  • 38
  • 90
  • 1
    While you can quantize the graph via `session = tf.keras.backend.get_session(); tf.contrib.quantize.create_training_graph(session.graph); session.run(tf.global_variables_initializer())`, note that Keras API for Tensorflow doesn't support quantization (yet) and it will work only with simple models. You should track those two open issues: [keras #11105](https://github.com/keras-team/keras/issues/11105), [tensorflow #27880](https://github.com/tensorflow/tensorflow/issues/27880). – hoefling Jun 23 '19 at 09:51

1 Answers1

0

well because the keras API does not support quantization in the current edition you are left with 3 options:

  1. wait for keras to have the required functionality
  2. rewrite your model with a different API that has this functionality
  3. find a different TPU that does not require you to quantize your data

either way though the solution is not great though.

user19273
  • 108
  • 9