Skip to content

Commit 2d52ead

Browse files
author
Svetlana Karslioglu
authored
Merge branch 'main' into sdpa_tutorial
2 parents 7f55bbf + 9580916 commit 2d52ead

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

intermediate_source/forward_ad_usage.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,12 @@ def fn(x, y):
100100
jvp = fwAD.unpack_dual(out).tangent
101101

102102
######################################################################
103-
# Using Modules stateless API (experimental)
103+
# Using the functional Module API (beta)
104104
# --------------------------------------------------------------------
105105
# Another way to use ``nn.Module`` with forward AD is to utilize
106-
# the stateless API. NB: At the time of writing the stateless API is still
107-
# experimental and may be subject to change.
106+
# the functional Module API (also known as the stateless Module API).
108107

109-
from torch.nn.utils._stateless import functional_call
108+
from torch.func import functional_call
110109

111110
# We need a fresh module because the functional call requires the
112111
# the model to have parameters registered.

0 commit comments

Comments
 (0)