sciai.common.LeCunNormal

View Source On Gitee
class sciai.common.LeCunNormal[source]

Yann LeCun Normal Initialization \({N}(0, \text{sigma}^2)\) in order to initialize a tensor, where

\[sigma = \sqrt{\frac{1}{fan\_in}}\]

‘fan_in’ is the number of input units of the weight tensor.

For details of LeCun Normal Initialization, please check: Neural Tangent Kernel: Convergence and Generalization in Neural Networks.

Supported Platforms:

GPU CPU Ascend

Examples

>>> import mindspore
>>> from mindspore.common.initializer import initializer
>>> from sciai.common.initializer import LeCunNormal
>>> tensor = initializer(LeCunNormal(), [1, 2, 3], mindspore.float32)