Skip to content

Commit

Permalink
add some ... for decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo committed Jul 24, 2023
1 parent ed3ee3b commit a5d5b96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/paddle/jit/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _dygraph_to_static_func_(dygraph_func):
>>> from paddle.jit.api import dygraph_to_static_func
>>> @dygraph_to_static_func
>>> def func(x):
... def func(x):
... if paddle.mean(x) < 0:
... x_v = x - 1
... else:
Expand Down Expand Up @@ -345,12 +345,12 @@ def not_to_static(func=None):
>>> import paddle
>>> @paddle.jit.not_to_static
>>> def func_not_to_static(x):
... def func_not_to_static(x):
... res = x - 1
... return res
>>> @paddle.jit.to_static
>>> def func(x):
... def func(x):
... if paddle.mean(x) < 0:
... out = func_not_to_static(x)
... else:
Expand Down

0 comments on commit a5d5b96

Please sign in to comment.