Skip to content

Commit b7877f6

Browse files
yashk2810Copybara-Service
authored and
Copybara-Service
committed
Reviewing the notebooks for tf 2.
PiperOrigin-RevId: 234199617
1 parent 5a12e1d commit b7877f6

File tree

5 files changed

+561
-7
lines changed

5 files changed

+561
-7
lines changed

site/en/r2/tutorials/_toc.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ toc:
2424
- title: Overview
2525
path: /r2/tutorials/eager/
2626
- title: Eager execution
27-
path: /r2/tutorials/eager/eager_basics
27+
path: /r2/tutorials/eager/basics
28+
- title: Custom layers
29+
path: /r2/tutorials/eager/custom_layers
2830
- title: Automatic differentiation
2931
path: /r2/tutorials/eager/automatic_differentiation
3032
- title: "Custom training: basics"
3133
path: /r2/tutorials/eager/custom_training
32-
- title: Custom layers
33-
path: /r2/tutorials/eager/custom_layers
3434
- title: "Custom training: walkthrough"
3535
path: /r2/tutorials/eager/custom_training_walkthrough
3636

site/en/r2/tutorials/eager/automatic_differentiation.ipynb

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@
9494
},
9595
"outputs": [],
9696
"source": [
97+
"from __future__ import absolute_import, division, print_function\n",
98+
"\n",
9799
"!pip install tf-nightly-2.0-preview\n",
98100
"import tensorflow as tf"
99101
]

site/en/r2/tutorials/eager/eager_basics.ipynb renamed to site/en/r2/tutorials/eager/basics.ipynb

+5-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"id": "U9i2Dsh-ziXr"
4242
},
4343
"source": [
44-
"# Eager execution basics"
44+
"# Tensors and Operations"
4545
]
4646
},
4747
{
@@ -89,6 +89,8 @@
8989
},
9090
"outputs": [],
9191
"source": [
92+
"from __future__ import absolute_import, division, print_function\n",
93+
"\n",
9294
"!pip install tf-nightly-2.0-preview"
9395
]
9496
},
@@ -101,7 +103,7 @@
101103
"source": [
102104
"## Import TensorFlow\n",
103105
"\n",
104-
"Import the `tensorflow` module to get started. [Eager execution](../../guide/eager.ipynb) is enabled by default."
106+
"To get started, import the `tensorflow` module. As of TensorFlow 2.0, eager execution is turned on by default. This enables a more interactive frontend to TensorFlow, the details of which we will discuss much later."
105107
]
106108
},
107109
{
@@ -144,7 +146,6 @@
144146
"print(tf.add([1, 2], [3, 4]))\n",
145147
"print(tf.square(5))\n",
146148
"print(tf.reduce_sum([1, 2, 3]))\n",
147-
"print(tf.io.encode_base64(\"hello world\"))\n",
148149
"\n",
149150
"# Operator overloading is also supported\n",
150151
"print(tf.square(2) + tf.square(3))"
@@ -436,7 +437,7 @@
436437
"metadata": {
437438
"colab": {
438439
"collapsed_sections": [],
439-
"name": "eager_basics.ipynb",
440+
"name": "basics.ipynb",
440441
"private_outputs": true,
441442
"provenance": [],
442443
"toc_visible": true,

site/en/r2/tutorials/eager/custom_training.ipynb

+2
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@
9797
},
9898
"outputs": [],
9999
"source": [
100+
"from __future__ import absolute_import, division, print_function\n",
101+
"\n",
100102
"!pip install tf-nightly-2.0-preview\n",
101103
"import tensorflow as tf"
102104
]

0 commit comments

Comments
 (0)