Skip to content

Commit

Permalink
tap
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYang1994 authored and YunYang1994 committed Mar 8, 2019
1 parent 98e1b5c commit 4941337
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"source": [
"x = tf.constant(3.0)\n",
"with tf.GradientTape(persistent=True) as t:\n",
" t.watch(x)\n",
" t.watch(x) # Ensures that `tensor` is being traced by this tape.\n",
" y = x * x\n",
" z = y * y\n",
"dz_dx = t.gradient(z, x) # 108.0 (4*x^3 at x = 3)\n",
Expand Down
2 changes: 1 addition & 1 deletion 1-Introduction/GradientTape.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"source": [
"x = tf.constant(3.0)\n",
"with tf.GradientTape(persistent=True) as t:\n",
" t.watch(x)\n",
" t.watch(x) # Ensures that `tensor` is being traced by this tape.\n",
" y = x * x\n",
" z = y * y\n",
"dz_dx = t.gradient(z, x) # 108.0 (4*x^3 at x = 3)\n",
Expand Down

0 comments on commit 4941337

Please sign in to comment.