Merge pull request #38952 from lanpa:fixdoc/enable_check_numerics

PiperOrigin-RevId: 309008824
Change-Id: I39b476a6fa7ae8ca82d114a1176a54aeb754c33f
This commit is contained in:
TensorFlower Gardener 2020-04-29 06:14:21 -07:00
commit aeb3758934

View File

@ -382,13 +382,13 @@ def enable_check_numerics(stack_height_limit=30,
x = -1.0
# When the following line runs, a function graph will be compiled
# from the Python function `log_x_plus_1()`. Due to the
# from the Python function `square_log_x_plus_1()`. Due to the
# `enable_check_numerics()` call above, the graph will contain
# numerics checking ops that will run during the function graph's
# execution. The function call generates an -infinity when the Log
# (logarithm) op operates on the output tensor of the Add op.
# The program errors out at this line, printing an error message.
y = log_x_plus_1(x)
y = square_log_x_plus_1(x)
z = -y
```