Using the retrained models in the sample iOS app
The iOS simple example we see in Chapter 1, Getting Started with Mobile TensorFlow, uses the Inception v1 model. To make the app use our retrained Inception v3 model and MobileNet model to do better dog breed recognition, we need to make a few changes to the app. Let's first see what it takes to use the retrained quantized_stripped_dogs_retrained.pb
in the iOS simple app:
- Double-click the
tf_simple_example.xcworkspace
file intensorflow/examples/ios/simple
to open the app in Xcode - Drag the
quantized_stripped_dogs_retrained.pb
model file, thedog_retrained_labels.txt
label file, and thelab1.jpg
image file we used to test thelabel_image
script, and drop to the project's data folder, making sure bothCopy items if needed
andAdd to targets
are checked, as shown in the following screenshot:

Figure 2.5 Adding the retrained model file and the label file to app
- Click the
RunModelViewController.mm
file in Xcode, which uses the TensorFlow C++ API to process...