Modeling Guide

Train MNIST Model Repository

This graph trains a simple neuronal network based on the tensorflow MNIST example below and stores the model packed as a tar file in the blob repository. Additionally, the training status can be tracked via a Terminal operator.

Tensorflow MNIST ExampleInformation published on non-SAP site.
The graph can be separated into three main components:
  • Training operator [TF Train MNIST Data]: The training uses a Python script that contains calls to the tensorflow API.
  • Repository Model Production Pipeline: The model .tar.gz-file is produced by the training operator and first stored on blob repository.
  • Tracking UI Pipeline: The training operator streams the current training status (process of the current training epoch) over its outport. This information is displayed by the Terminal operator.

Prerequisites

  • (Only if run in local mode) Operators in this graph use the following libraries:
    • Python 2.7+

    • TensorFlow 1.0.1

Configure and Run the Graph

Follow the steps below to run the training example from the Data Pipeline UI:
  1. In the left panel, select the Graphs tab and navigate to com.sap.ml/tensorflow/trainMnist.
  2. After the graph loads, click the Model Producer operator.
  3. In the properties panel, set the blobName and blobVersion fields to the name and version of the model to be saved.
  4. Click on the Metadata Generator operator.
  5. Edit the content field to set the model metadata.
  6. In the tool bar, select “Save Graph” (disk button) and then Run Graph (play button).
  7. The Status panel indicates if the graph is running.
  8. Open the Terminal UI to see the accuracy and model save progress.