Created
September 7, 2018 11:31
-
-
Save miquelbeltran/801b3173b14a4d60fcf9dcce91e2089f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from keras import backend as K | |
| custom_input_tensor = tf.placeholder(tf.float32, shape=(1, 784)) | |
| output_tensor = model(custom_input_tensor) | |
| frozen_graph = freeze_session(K.get_session(), output_names[output_tensor.op.name]) | |
| tflite_model = tf.contrib.lite.toco_convert(frozen_graph,[custom_input_tensor], [output_tensor]) | |
| open("app/src/main/assets/nmist_mlp.tflite", "wb").write(tflite_model) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment