{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "accelerator": "TPU", "colab": { "name": "Keras Fashion MNIST", "provenance": [], "collapsed_sections": [ "N6ZDpd9XzFeN" ], "toc_visible": true }, "kernelspec": { "display_name": "Python 3", "name": "python3" } }, "cells": [ { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "N6ZDpd9XzFeN" }, "source": [ "##### Copyright 2018 The TensorFlow Hub Authors.\n", "\n", "Licensed under the Apache License, Version 2.0 (the \"License\");" ] }, { "cell_type": "code", "metadata": { "cellView": "form", "colab_type": "code", "id": "KUu4vOt5zI9d", "colab": {} }, "source": [ "# Copyright 2018 The TensorFlow Hub Authors. All Rights Reserved.\n", "#\n", "# Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", "# You may obtain a copy of the License at\n", "#\n", "# http://www.apache.org/licenses/LICENSE-2.0\n", "#\n", "# Unless required by applicable law or agreed to in writing, software\n", "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License.\n", "# ==============================================================================" ], "execution_count": 0, "outputs": [] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "edfbxDDh2AEs" }, "source": [ "## Fashion MNIST with Keras and TPUs" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "RNo1Vfghpa8j" }, "source": [ "## Overview\n", "\n", "In this example, you can try out using tf.keras and Cloud TPUs to train a model on the fashion MNIST dataset. The model trains for 10 epochs on Cloud TPU and takes approximately 2 minutes to run.\n", "\n", "This notebook is hosted on GitHub. To view it in its original repository, after opening the notebook, select **File > View on GitHub**." ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "dgAHfQtuhddd" }, "source": [ "## Learning objectives\n", "\n", "In this Colab, you will learn how to:\n", "* Code for a standard conv-net that has 3 layers with drop-out and batch normalization between each layer in Keras.\n", "* Create and compile the model under a distribution strategy in order ot use TPUs.\n", "* Run a prediction to see how well the model can predict fashion categories and output the result." ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "QrprJD-R-410" }, "source": [ "## Instructions" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "_I0RdnOSkNmi" }, "source": [ "