2019-06-11 16:29:15 +00:00
|
|
|
.. role:: hidden
|
|
|
|
|
:class: hidden-section
|
|
|
|
|
|
2019-10-15 14:29:36 +00:00
|
|
|
.. _nn-init-doc:
|
|
|
|
|
|
2019-06-11 16:29:15 +00:00
|
|
|
torch.nn.init
|
|
|
|
|
=============
|
|
|
|
|
|
2022-07-07 17:19:29 +00:00
|
|
|
.. warning::
|
|
|
|
|
All the functions in this module are intended to be used to initialize neural network
|
|
|
|
|
parameters, so they all run in :func:`torch.no_grad` mode and will not be taken into
|
|
|
|
|
account by autograd.
|
|
|
|
|
|
2019-06-11 16:29:15 +00:00
|
|
|
.. currentmodule:: torch.nn.init
|
|
|
|
|
.. autofunction:: calculate_gain
|
|
|
|
|
.. autofunction:: uniform_
|
|
|
|
|
.. autofunction:: normal_
|
|
|
|
|
.. autofunction:: constant_
|
2019-07-25 13:01:35 +00:00
|
|
|
.. autofunction:: ones_
|
|
|
|
|
.. autofunction:: zeros_
|
2019-06-11 16:29:15 +00:00
|
|
|
.. autofunction:: eye_
|
|
|
|
|
.. autofunction:: dirac_
|
|
|
|
|
.. autofunction:: xavier_uniform_
|
|
|
|
|
.. autofunction:: xavier_normal_
|
|
|
|
|
.. autofunction:: kaiming_uniform_
|
|
|
|
|
.. autofunction:: kaiming_normal_
|
2022-05-06 14:33:08 +00:00
|
|
|
.. autofunction:: trunc_normal_
|
2019-06-11 16:29:15 +00:00
|
|
|
.. autofunction:: orthogonal_
|
|
|
|
|
.. autofunction:: sparse_
|