Skip to content

Commit

Permalink
[doc] Update docstring for grad replaced (#6800)
Browse files Browse the repository at this point in the history
Update docstring for grad replaced from `ti.grad_replaced` to
`ti.ad.grad_replaced`.
  • Loading branch information
erizmr committed Dec 3, 2022
1 parent 21d8177 commit 61effe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/taichi/ad/_ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,11 @@ def grad_replaced(func):
>>> for I in ti.grouped(x):
>>> x.grad[I] = y.grad[I] / a
>>>
>>> @ti.grad_replaced
>>> @ti.ad.grad_replaced
>>> def foo(a):
>>> multiply(a)
>>>
>>> @ti.grad_for(foo)
>>> @ti.ad.grad_for(foo)
>>> def foo_grad(a):
>>> multiply_grad(a)"""
def decorated(*args, **kwargs):
Expand Down

0 comments on commit 61effe9

Please sign in to comment.