Using fast neural-style transfer models in Android
In Chapter 2, Classifying Images with Transfer Learning, we described how to add TensorFlow to your own Android app, but without any UI. Let's create a new Android app to use the fast-style transfer models we trained earlier and used in iOS.
Because this Android app offers a good opportunity to use the minimal TensorFlow-related code and Android UI and threaded code to run a complete TensorFlow model-powered app, we'll go through each line of the code added from scratch to help you further understand what it takes to develop an Android TensorFlow app from scratch:
In Android Studio, select
File
|New
|New Project...
and enterFastNeuralTransfer
as theApplication Name
; accept all the defaults before clicking Finish.Create a new
assets
folder, as shown in Figure 2.13, and drag the fast neural transfer models you have trained, from the iOS app if you have tried it in the previous section, or from the folder/tf_files
as in step 7 of the Training...