Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GIDS18_SupriyaSrivatsa.pdf

 GIDS18_SupriyaSrivatsa.pdf

Supriya Srivatsa

April 24, 2018
Tweet

More Decks by Supriya Srivatsa

Other Decks in Technology

Transcript

  1. Overview • AI and Mobile – the Convergence • Inference

    – Today and Tomorrow • TensorFlow Primer • TensorFlow in your Pocket – TensorFlow Mobile – TensorFlow Lite • PokéDemo • Applications and Case Studies • Q & A
  2. Why On Device Prediction • Data Privacy • Poor Internet

    Connection • Questionable User Experience
  3. TensorFlow – Deferred Execution Model (Building the Computational Graph) import

    tensorflow as tf num1 = tf.constant(5) num2 = tf.constant(10) sum = num1 + num2 print(sum) #O/P: Tensor("add:0", shape=(), dtype=int32)
  4. TensorFlow – Deferred Execution Model (Running the Computational Graph) import

    tensorflow as tf num1 = tf.constant(5) num2 = tf.constant(10) sum = num1 + num2 with tf.Session() as sess: print(sess.run(sum)) #O/P: 15
  5. Pick Your Weapon • Choose a pre-trained TF Model –

    Inception V3 Model – MNIST – Smart Reply – Deep Speech • Build a TF Model
  6. TensorFlow Lite • Smaller binary size, better performance. • Ability

    to leverage hardware acceleration. • Only supports a limited set of operators.
  7. Quantization • Round it up • Transform: round_weights • Compression

    rates: ~8% => ~70% • Shrink down node names • Transform: obfuscate_names • Eight bit calculations
  8. TensorFlow Lite • TOCO – TensorFlow Lite Optimizing Converter –

    Pruning unused nodes. – Performance Improvements. – Convert to tflite format. (Generate FlatBuffer file.)