This tutorial shows how to design convolutional neural network with Neural Network Modeler (part of Watson Studio), train it using GPU cluster, deploy and finally make part of an iOS sample application.
- Watson Studio with deep learning capabilities
- Xcode 9
-
In Watson Studio project add new Modeler flow. Import this sample flow for hand written digits recognition (MNIST) using
From fileoption. -
Upload train/test/validate data sets to your Cloud Object Storage. Data sets can be found here.
-
Open
Image Datanode details and specify you COS details (with uploaded files). -
Publish Training Definitionusing up-arrow button (top right corner of flow editor). -
Click
train it in an experimentlink to switch to experiment studio.
- Define experiment details such as:
- name
- select COS with training data
- select existing training definition (the one publish from the flow editor) and compute plan
-
Trigger model training process by pressing
Create and runbutton. -
You can monitor your training progress by clicking the training run name and next in run details
Logstab. -
When training is completed you can store trained model in repository by choosing from Action menu
Store model(Completed runs section).
-
Open stored model details (click on model name under Models section).
-
In
Deploymentstab(+) Add Deployment -
Select deployment type as
virtualand format asCore ML -
Specify the following parameters:
image_input_nameswith value'input1'image_scalewith value0,003921568627451
- Create Deployment
-
In deployment details you can find
download_urlthat allows to get Core ML content of Deployment. Download the Core ML model. -
Clone the following sample application swift project from github.
-
Open Go-Digits.xcodeproj in Xcode 9.
-
Add Core ML model to the project. Rename it to
mnistCNN.mlmodel -
Next build application and run it on a device or simulator with iOS 11.

