Running the TensorFlow and Keras models on Android

It turns out it's like walking on the beach using the models on Android - we don't even need to use the custom TensorFlow Android library as we did in the last chapter, although we have to use the custom TensorFlow library (not the TensorFlow pod as of February 2018) on iOS. The TensorFlow Android library built with compile 'org.tensorflow:tensorflow-android:+' in the build.gradle file must have more complete data type support for the Less Op than the TensorFlow pod for iOS does.

To test the models in Android, create a new Android app StockPrice and add the two model files to its assets folder. Then add a couple of buttons and a TextView in the layout and define some fields and constants ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.