Commit d2065824 authored by Billy Lamberta's avatar Billy Lamberta
Browse files

Add text to index

parent c6f12863
...@@ -61,7 +61,14 @@ ...@@ -61,7 +61,14 @@
"source": [ "source": [
"# Get Started with TensorFlow\n", "# Get Started with TensorFlow\n",
"\n", "\n",
"First, import TensorFlow into your program:" "This is a [Google Colaboratory](https://colab.sandbox.google.com/notebooks/welcome.ipynb) notebook file. Python programs are run directly in the browser—a great way to learn and use TensorFlow. To run the Colab notebook:\n",
"\n",
"1. Connect to a Python runtime: At the top-right of the menubar, select *CONNECT*.\n",
"2. Run all the notebook code cells: Select *Runtime* > *Run all*.\n",
"\n",
"For more examples and guides, see [Get Started with TensorFlow](https://www.tensorflow.org/get_started/).\n",
"\n",
"Let's get started, import the TensorFlow library into your program:"
] ]
}, },
{ {
...@@ -89,7 +96,7 @@ ...@@ -89,7 +96,7 @@
}, },
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"Load and configure the [MNIST](http://yann.lecun.com/exdb/mnist/) dataset. Convert the samples from an int to a float:" "Load and configure the [MNIST](http://yann.lecun.com/exdb/mnist/) dataset. Convert the samples from integers to a floating-point numbers:"
] ]
}, },
{ {
...@@ -107,9 +114,9 @@ ...@@ -107,9 +114,9 @@
"source": [ "source": [
"mnist = tf.keras.datasets.mnist\n", "mnist = tf.keras.datasets.mnist\n",
"\n", "\n",
"(X_train, y_train), (X_test, y_test) = mnist.load_data()\n", "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n",
"\n", "\n",
"X_train, X_test = X_train / 255.0, X_test / 255.0" "x_train, x_test = x_train / 255.0, x_test / 255.0"
], ],
"execution_count": 0, "execution_count": 0,
"outputs": [] "outputs": []
...@@ -121,7 +128,7 @@ ...@@ -121,7 +128,7 @@
}, },
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"Build the `tf.keras` model:" "Build the `tf.keras` model by stacking layers. Select an optimizer and loss function used for training:"
] ]
}, },
{ {
...@@ -174,12 +181,22 @@ ...@@ -174,12 +181,22 @@
}, },
"cell_type": "code", "cell_type": "code",
"source": [ "source": [
"model.fit(X_train, y_train, epochs=5)\n", "model.fit(x_train, y_train, epochs=5)\n",
"\n", "\n",
"model.evaluate(X_test, y_test)" "model.evaluate(x_test, y_test)"
], ],
"execution_count": 0, "execution_count": 0,
"outputs": [] "outputs": []
},
{
"metadata": {
"id": "T4JfEh7kvx6m",
"colab_type": "text"
},
"cell_type": "markdown",
"source": [
"See [Get Started with TensorFlow](https://www.tensorflow.org/get_started/) for next steps."
]
} }
] ]
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment