Writing the mobile application using the TensorFlow model

What we are going to do?

In this section, we are going to build a small (a+b)2 model in TensorFlow, deploy it into an android mobile application, and run it from the Android mobile device.

What do you need to know?

To proceed in this section, you need a working installation of Python, TensorFlow dependencies, and android studio, and also some knowledge of python and java android. You can find the instructions on how to install TensorFlow here: https://www.tensorflow.org/install/.

If you need a detailed installation procedure for Windows, please refer to the one provided with screenshots in the Chapter 11, The Future of ML on Mobile Applications of this book.

We saw the details of TensorFlow already. To put it onto a simple words TensorFlow is nothing but saving the tensor flow program written in python into a small file that can be read by the C++ native libraries what we will install in our Android app and can execute and do the inference from the mobile. To do so, JNI (Java native interface) is working as a bridge between java and C++.

To learn more about the idea behind tensor flow lite, check out https://www.tensorflow.org/mobile/tflite/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset