Skip to content

Commit 6f1d99b

Browse files
albanDpytorchmergebot
authored andcommitted
update nn.init doc to reflect the no_grad (pytorch#80882)
Fixes pytorch#80839 Pull Request resolved: pytorch#80882 Approved by: https://github.com/jbschlosser
1 parent bd75b2f commit 6f1d99b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/source/nn.init.rst

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
torch.nn.init
77
=============
88

9+
.. warning::
10+
All the functions in this module are intended to be used to initialize neural network
11+
parameters, so they all run in :func:`torch.no_grad` mode and will not be taken into
12+
account by autograd.
13+
914
.. currentmodule:: torch.nn.init
1015
.. autofunction:: calculate_gain
1116
.. autofunction:: uniform_

0 commit comments

Comments
 (0)