Created
August 31, 2018 06:54
-
-
Save miquelbeltran/efd06894772cf65d4ef7d57fce94a4ab 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
| import tensorflow as tf | |
| img = tf.placeholder(name="img", dtype=tf.float32, shape=(1)) | |
| val = img + tf.constant([1.]) | |
| out = tf.identity(val, name="out") | |
| with tf.Session() as sess: | |
| output = sess.run(out, feed_dict={img: [1]}) | |
| print(output) | |
| tflite_model = tf.contrib.lite.toco_convert(sess.graph_def, [img], [out]) | |
| open("plus_one.tflite", "wb").write(tflite_model) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment