MCPcopy Create free account
hub / github.com/apache/singa / lecun_normal

Function lecun_normal

python/singa/initializer.py:148–162  ·  view source on GitHub ↗

LeCun normal initializer. It draws samples from a truncated normal distribution centered on 0 with `stddev = sqrt(1 / fan_in)` where `fan_in` is the number of input units in the weight tensor. # Arguments t(Tensor):the tensor to be filled in. # References - [Se

(t)

Source from the content-addressed store, hash-verified

146 _random_fill(t, scale=2., mode='fan_in', distribution='normal')
147
148def lecun_normal(t):
149 """LeCun normal initializer.
150
151 It draws samples from a truncated normal distribution centered on 0
152 with `stddev = sqrt(1 / fan_in)`
153 where `fan_in` is the number of input units in the weight tensor.
154
155 # Arguments
156 t(Tensor):the tensor to be filled in.
157
158 # References
159 - [Self-Normalizing Neural Networks](https://arxiv.org/abs/1706.02515)
160 - [Efficient Backprop](http://yann.lecun.com/exdb/publis/pdf/lecun-98b.pdf)
161 """
162 _random_fill(t, scale=1., mode='fan_in', distribution='normal')
163
164
165def he_uniform(t):

Callers

nothing calls this directly

Calls 1

_random_fillFunction · 0.85

Tested by

no test coverage detected