This commit is contained in:
Tzu-Wei Huang 2020-04-28 01:27:09 +08:00
parent 44d7f07737
commit bc0a8d8443

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
```