More Samples

In addition to the tutorials available on this documentation site, there are a number of reference machine learning models optimized for running on Cloud TPU. This page summarizes the additional models and tells you where to find them on GitHub.

Getting the samples

The source code for the models is available on GitHub. More samples will be added to the repo over time, so be sure to check GitHub regularly.

Many of the models are also pre-installed on the tf-1-11 VM image that you set up when following the quickstart guide. The models are located in the following directories on the VM:

/usr/share/models/official/
/usr/share/tpu/

Image classification

DenseNet

DenseNet is a variation of the ResNet image classification model where there is a full ("dense") set of skip-layer connections. See the DenseNet model optimized for Cloud TPU on GitHub. This sample is an implementation of the DenseNet image classification model.

MobileNet

MobileNet is an image classification model that performs well on power-limited devices such as mobile phones, leveraging depth-wise separable convolutions. See the MobileNet v1 model optimized for Cloud TPU on GitHub. This sample is an implementation of the MobileNet image classification model.

The code for the model is based on the original TensorFlow MobileNet_v1, with the following adjustments:

  • TPUEstimator interface.
  • Data processing pipeline for ImageNet.

SqueezeNet

SqueezeNet is an image classification model that is optimized for fewer parameters and a much smaller model size without sacrificing quality compared to contemporary image classification models (AlexNet). See the SqueezeNet model optimized for Cloud TPU on GitHub. This sample is an implementation of the SqueezeNet image classification model.

Image generation

The experimental DCGAN project trains a Deep Convolutional Generative Adversarial Networks (DCGAN) model to produce generated images based on the MNIST and CIFAR-10 datasets.

The project includes simple generator and discriminator models based on the convolutional and deconvolutional models presented in Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks.

What's next

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

Send feedback about...