2021 Call for Code Awards: Live from New York, with SNL’s Colin Jost! Learn more

Image recognition training with PowerAI notebooks


This code pattern was built for developers looking to leverage the new PowerAI offering from IBM. We will use a Jupyter Notebook to showcase an example of transfer learning with the TensorFlow Inception model on IBM POWER8® systems. The notebook will focus on creating a custom classifier to recognize houses with pools vs. houses without pools from JPEG images. The intended audience is application developers who need to efficiently build powerful deep-learning applications, but may not have an abundance of time or data science experience.


Transfer learning is the process of taking a pre-trained model (the weights and parameters of a network that has been trained on a large dataset by somebody else) and fine-tuning the model with your own dataset. The idea is that this pre-trained model will act as a feature extractor. You will remove the last layer of the network and replace it with your own classifier (depending on what your problem space is). You then freeze the weights of all the other layers (by not changing the weights during gradient descent/optimization) and train the network normally. For this experiment, we used the Inception-v3 pre-trained model for image classification. This model consists of two parts:

  • Feature extraction with a convolutional neural network
  • Classification with fully connected and softmax layers

The pre-trained Inception-v3 model achieves state-of-the-art accuracy for recognizing general objects with 1,000 classes. The model extracts general features from input images in the first part and classifies them based on those features in the second part. We will use this pre-trained model and retrain it to classify houses with or without swimming pools.

Upon completion of this code pattern, you will understand how to load and run a Jupyter Notebook with Nimbix and PowerAI, use transfer learning to leverage the TensorFlow Inception model to create a custom classifier from a set of images, then test and demonstrate the resulting classifier.



  1. The developer loads the provided notebook, which is run on a PowerAI system.
  2. A provided example dataset demonstrates a use case of recognizing images of houses with pools vs. houses without pools.
  3. The notebook uses the TensorFlow Inception model and retraining example to leverage the existing model and build a custom classifier.
  4. The notebook compares results using the original model and the new model.


Find the detailed steps for this pattern in the README. The steps will show you how to:

  1. Get 24 hours of free access to the PowerAI platform.
  2. Access and start the Jupyter notebook.
  3. Run the notebook.
  4. Analyze the results.
  5. Save and share.
  6. End your trial.