Creating Android apps with a DL model
In this section, we will discuss how Android supports TF Lite and PyTorch Mobile. Java and Java Virtual Machine (JVM)-based languages (for example, Kotlin) are the preferred languages for Android apps. In this section, we will be using Java. The basics of Android app development can be found at https://developer.android.com.
We first focus on running TF Lite model inference on Android using the org.tensorflow:tensorflow-lite-support
library. Then, we discuss how to run TorchScript model inference using the org.pytorch:pytorch_android_lite
library.
Running TF Lite model inference on Android
First, let’s look at how to run a TF Lite model on Android using Java. The org.tensorflow:tensorflow-lite-support
library is used to deploy a TF Lite model on an Android app. The library supports Java, C++ (beta), and Swift (beta). A complete list of supported environments can be found at https://github.com/tensorflow/tflite-support.
Android...