Running the TensorFlow and Keras models on iOS

We won't bore you by repeating the project setup step - just follow what we did before to create a new Objective-C project named StockPrice that will use the manually built TensorFlow library (see the iOS section of Chapter 7, Recognizing Drawing with CNN and LSTM, if you need detailed info). Then add the two amzn_tf_frozen.pb and amzn_keras_frozen.pb model files to the project and you should have your StockPrice project in Xcode, as in Figure 8.3:

Figure 8.3 iOS app using the TensorFlow- and Keras-trained models in Xcode

In ViewController.mm, we'll first declare some variables and one constant: ...

Get Intelligent Mobile Projects with TensorFlow now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.