AWS Machine Learning Blog

AWS Deep Learning AMI Now Supports PyTorch, Keras 2 and Latest Deep Learning Frameworks

Today, we’re pleased to announce an update to the AWS Deep Learning AMI.

The AWS Deep Learning AMI, which lets you spin up a complete deep learning environment on AWS in a single click, now includes PyTorch, Keras 1.2 and 2.0 support, along with popular machine learning frameworks such as TensorFlow, Caffe2 and Apache MXNet.

Using PyTorch for fast prototyping

The AMI now includes PyTorch 0.2.0, allowing developers to create dynamic neural networks in Python, a good fit for dynamic inputs such as text and time series. Developers can get started quickly using these beginner and advanced tutorials, including setting up distributed training with PyTorch.

Improved Keras support

The AMI now supports the most recent version of Keras, v2.0.8. By default, your Keras code will run against TensorFlow as a backend; you can also swap to other supported backends such as Theano and CNTK. We’ve also included a modified version of Keras 1.2.2 which runs on the Apache MXNet backend with better training performance.

Pre-installed and configured with the latest frameworks

This release of the AMI includes support for the latest versions of the following frameworks:

  • Apache MXNet 0.11.0
  • TensorFlow 1.3.0
  • Caffe2 0.8.0
  • Caffe 1.0
  • PyTorch 0.2.0
  • Keras 2.0.8
  • Keras 1.2.2 (DMLC fork) for Apache MXNet
  • Theano 0.9.0
  • CNTK 2.0
  • Torch (master branch)

It is also packaged with the following pre-configured libraries for GPU acceleration:

  • CUDA Toolkit 8.0
  • cuDNN 5.1
  • NVidia Driver 375.66
  • NCCL 2.0

Take Gluon for A test drive

Last but not least, the AMI includes Gluon, a new open source deep learning interface which allows developers to easily and quickly build machine learning models, without compromising performance. You can read more about Gluon in our launch announcement, and get started with over 50 notebooks with sample code.

You can launch the AWS Deep Learning AMI for Ubuntu and Amazon Linux with a single click from the AWS Marketplace, or follow this step-by-step guide to get started and launch your first notebook.

Happy modeling!


PS: A note on Keras support.

You can swap between Keras 1 and Keras 2 using the Conda virtual environment. Keras 2 will run by default; to swap to Keras 1 and the MXNet backend, use the following command:

For Python 2 users:

source ~/src/anaconda3/bin/activate keras1.2_p2

For Python 3 users:

source ~/src/anaconda3/bin/activate keras1.2_p3

Then, from inside this virtual environment, you can start python, and import and run Keras 1.2.2 as you would normally:

import keras

You can learn more about Conda and its command-line interfaces for managing virtual environments by going to the Conda Getting Started Guide.

You can find the AWS Deep Learning AMI for Ubuntu and Amazon Linux on the AWS Marketplace. And follow this step-by-step guide to get started with deep learning development in the cloud.