Difficulty: Beginner
Estimated Time: 5 minutes

Welcome

In this scenario, you will learn how to quickly train, deploy, and query a TensorFlow model using the Skymind Intelligence Layer (SKIL). On a very high level, what SKIL does is model training and inference, as well as ETL jobs and other such tasks. SKIL connects to many data sources and streaming enginines and its predictions can be included in a variety of applications down the line.

SKIL conceptual model

Finished

You've finished another SKIL example, running and deploying a TensorFlow model. All you needed to do was to:

  • Bring a TensorFlow model of your choice
  • Define a SKIL workspace and experiment
  • Register your model in SKIL
  • Deploy the model as service and get predictions from it.

Deploy a TF Model with SKIL

Step 1 of 4

Step 1

Training and saving a TensorFlow model

To deploy a deep learning model in production, you first need a model to begin with. For that we've prepared a Python script called train.py for you that does the following steps:

  • It loads the MNIST dataset containing handwritten digits and their labels.
  • It defines a small Multilayer Perceptron (MLP) model in Tensorflow.
  • It then trains this model on MNIST data and stores the resulting model to the file model.pb.

If you're interested in the details, click on train.py in the editor on the right. If you're ready to go, you can simply run this script by pasting this snippet to the interactive shell in the lower right window:

python train.py

As the script runs through, you'll see that model.pb gets created in the file tree of your editor window.

That completes the first step. We can now move on to deploying your TensorFlow model with the Skymind Intelligence Layer (SKIL).