It turns out we don't need to use the custom TensorFlow Android library, as we did in Chapter 7, Recognizing Drawing with CNN and LSTM, to run the GAN models in Android. Simply create a new Android Studio app called GAN with all the defaults, add compile 'org.tensorflow:tensorflow-android:+' to the app's build.gradle file, create a new assets folder and copy the two GAN model files and a test blurry image there.
Your project in Android Studio should now look like Figure 9.5:
Figure 9.5: Android Studio GAN app overview, showing constant definitions
Notice that for simplicity, we set BATCH_SIZE to 1. You can easily set it to any number and get that many outputs back as we did in iOS. Other than the constants defined in Figure 9.5, we'll create a few instance variables:
private Button mButtonMNIST;
private Button mButtonPix2Pix...