Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
Correctly indent insert_grad_of code block. (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-zheng authored and Dan Moldovan committed Jul 2, 2018
1 parent 2f06bb6 commit 1a8880f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ You can use the `insert_grad_of` feature to do more than debugging and logging.
def f(params, x):
h = x
for i in range(5):
with insert_grad_of(h) as g:
g = tf.clip_by_value(g, -1, 1)
h = rnn(params, h)
with insert_grad_of(h) as g:
g = tf.clip_by_value(g, -1, 1)
h = rnn(params, h)
return h

dfdparams = tangent.grad(f)
Expand Down

0 comments on commit 1a8880f

Please sign in to comment.