{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "origin_pos": 0
   },
   "source": [
    "# Using Google Colab\n",
    ":label:`sec_colab`\n",
    "\n",
    "We introduced how to run this book on AWS in :numref:`sec_sagemaker` and :numref:`sec_aws`. Another option is running this book on [Google Colab](https://colab.research.google.com/), which provides free GPU if you have a Google account.\n",
    "\n",
    "To run a section on Colab, you can simply click the `Colab` button to the right of the title of that section, such as in :numref:`fig_colab`. \n",
    "\n",
    "![Open a section on Colab](../img/colab.png)\n",
    ":width:`300px`\n",
    ":label:`fig_colab`\n",
    "\n",
    "\n",
    "When it is the first time you execute a code cell, you will receive a warning message as shown in :numref:`fig_colab2`. You may click \"RUN ANYWAY\" to ignore it.\n",
    "\n",
    "![The warning message for running a section on Colab](../img/colab-2.png)\n",
    ":width:`300px`\n",
    ":label:`fig_colab2`\n",
    "\n",
    "Next, Colab will connect you to an instance to run this notebook. Specifically, if GPU is needed, such as when invoking the `d2l.try_gpu()` function, we will request Colab to connect to a GPU instance automatically.\n",
    "\n",
    "\n",
    "## Summary\n",
    "\n",
    "* You can use Google Colab to run each section of this book with GPUs.\n",
    "\n",
    "\n",
    "## Exercises\n",
    "\n",
    "1. Try to edit and run the code in this book using Google Colab.\n",
    "\n",
    "\n",
    "[Discussions](https://discuss.d2l.ai/t/424)\n"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}