Difficulty: Beginner
Estimated Time: 5 minutes


In this scenario, you will learn how to quickly train, deploy, and query a Keras model using the Skymind Intelligence Layer (SKIL). SKIL supports model training and inference, as well as ETL jobs and other tasks. It connects to many data sources and streaming enginines, and its predictions can be included in a variety of applications downstream.

SKIL conceptual model


You've finished your very first SKIL example, running and deploying a Keras model. All you needed to do was to:

  • Bring a Keras 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 Keras Model with SKIL

Step 1 of 4

Step 1

Training and saving a Keras model

To deploy a deep learning model in production, you first need a trained model. For that, we've prepared a Python script called train.py that performs the following tasks:

  • Loading the MNIST dataset containing handwritten digits and their labels
  • Defining a small Multilayer Perceptron (MLP) model in Keras
  • Training this model on MNIST data and storing the resulting model to the file model.h5

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 clicking below.

python train.py

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

That completes the first step. We can now that Keras model with the Skymind Intelligence Layer (SKIL).