More Samples & Tutorials

This page summarizes tutorials and samples that demonstrate how to create applications with Cloud Machine Learning Engine.

Getting the samples

The latest Cloud ML Engine samples are available on GitHub.

If you followed the getting started guide, you downloaded many of these samples to your development environment, where you can run them and experiment with them. More samples will be added to the repo over time, so be sure to check GitHub regularly.

Understanding the samples

The provided samples give concrete examples of how Cloud ML Engine is used. In this section, you'll be introduced to each sample and given information about what they do and what parts of Cloud ML Engine they feature.

Each sample uses a public dataset for its learning model. The datasets are well- known to data scientists and readily available. They are hosted for your use on Google Cloud Storage.

Wide and Deep Classification with TensorFlow and Keras

The following samples use a United States Census dataset to train a model which predicts a person's income level. These classification samples provide an introduction to using Cloud ML Engine. They demonstrate an end-to-end machine learning solution with most of the features of Cloud ML Engine, including hyperparameter tuning, online prediction and batch prediction.

TensorFlow Estimator API Census Sample

The TensorFlow Estimator census sample is the introductory example for Cloud ML Engine. The API allows you to iterate quickly and adapt models to your own datasets without major code overhauls.

This sample is available on GitHub: Predicting Income with the Census Income Dataset

TensorFlow Custom Estimator API Census Sample

The TensorFlow Custom Estimator sample can be used to run through all of the same steps demonstrated in the Estimator API sample. This sample uses a custom implementation of tf.estimator.Estimator. Custom estimators are useful when you need additional control over the ops necessary to perform training, evaluation, or predictions.

This sample is available on GitHub: Predicting Income with the Census Income Dataset

TensorFlow Core API Census Sample

The TensorFlow Core census sample can be used to run through all of the same steps demonstrated in the Estimator API sample. This sample uses the low level bindings to build a model, which makes it helpful for understanding the underlying workings of TensorFlow and best practices when using the Core API.

This sample is available on GitHub: Predicting Income with the Census Income Dataset

Keras Census Sample

The Keras census sample is the introductory example for using Keras on Cloud ML Engine to train a model and get predictions.

This sample is available on GitHub: Predicting Income with the Census Income Dataset using Keras

Personalized Recommendation

The Movielens sample demonstrates how to build personalized recommendation models to recommend movies to users based on movie ratings data from the movielens 20M dataset.

This sample is available on GitHub: MovieLens Sample

Advertisement - CTR Prediction

The Criteo sample demonstrates the capability of both linear and deep models on the Criteo dataset. This sample involves working with a 1 TB dataset to create a model for predicting whether or not a person is likely to click on an advertisement.

This sample is available on GitHub: Criteo Sample

Unstructured Text Data

The Reddit sample demonstrates the capability of both linear and deep models on a Reddit dataset. The model predicts the score of a reddit from its comments.

This sample includes a data pre-processing step that reads data from Google BigQuery and converts it to TFRecords format.

This sample is available on GitHub: Reddit Sample

Image Transfer Learning

The Flowers sample demonstrates how to create a customized image classification model using image-based transfer learning. The model predicts the type of a flower from its image.

This sample includes a data pre-processing step that extracts image features from a set of labeled images.

You can also read about this sample in the December 2016 blog post named How to classify images with TensorFlow using Google Cloud Machine Learning and Cloud Dataflow.

Image Recognition - CIFAR-10 Estimator

This sample demonstrates how to use TensorFlow Estimators to train and evaluate a residual network learning model using the CIFAR-10 dataset.

Included is guidance on how to run the model on single or multiple hosts with either one CPU or multiple GPUs.

This sample is available on GitHub: CIFAR-10 Estimator

Spark-TensorFlow Interaction

This sample illustrates how data loaded into Spark from various sources can be used to train TensorFlow models and how these models can then be served on Google Cloud Platform.

This sample is available on GitHub: Spark-TensorFlow

Object Detection using the Object Detection API and ML Engine

This sample demonstrates how to use the Tensorflow Object Detection API as distributed training running on Cloud ML Engine.

For additional information about object detection, see:

This sample is available on GitHub: Running on Google Cloud Platform

Smartening Up Support Tickets with Serverless Machine Learning

The Smartening Up Support Tickets with Serverless Machine Learning tutorial shows how to augment a typical helpdesk scenario by enriching ticket data with Cloud AI using an event-based serverless architecture. The tutorial shows how to build the architecture outlined in the accompanying articles, Architecture of a Serverless Machine Learning Model and Building a Serverless Machine Learning Model.

Automating IoT Machine Learning: Bridging Cloud and Device Benefits with Cloud ML Engine

The Automating IoT Machine Learning: Bridging Cloud and Device Benefits with Cloud ML Engine tutorial shows how to automate a workflow that delivers new or updated machine learning models directly to IoT (Internet of Things) devices.

What's Next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud ML Engine for TensorFlow