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:
unique_ptr<tensorflow::Session> tf_session;
UITextView *_tv;
UIButton *_btn;
NSMutableArray *_closeprices;
const int SEQ_LEN = 20;
Then create a button-tap handler to let the user choose either the TensorFlow or Keras model ...