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

Function he_uniform

python/singa/initializer.py:165–180  ·  view source on GitHub ↗

Initialize the values of the input tensor following a uniform distribution with specific bounds. It draws samples from a uniform distribution within [-limit, limit] where `limit` is `sqrt(6 / fan_in)` where `fan_in` is the number of input units in the weight tensor. # Arguments

(t)

Source from the content-addressed store, hash-verified

163
164
165def he_uniform(t):
166 '''Initialize the values of the input tensor following a uniform
167 distribution with specific bounds.
168
169 It draws samples from a uniform distribution within [-limit, limit]
170 where `limit` is `sqrt(6 / fan_in)`
171 where `fan_in` is the number of input units in the weight tensor.
172
173 # Arguments
174 t(Tensor): the tensor to be filled in.
175
176 # References
177 - [Delving Deep into Rectifiers: Surpassing Human-Level Performance on
178 ImageNet Classification](http://arxiv.org/abs/1502.01852)
179 '''
180 _random_fill(t, scale=2., mode='fan_in', distribution='uniform')
181
182
183@deprecated(reason="Use he_normal or glorot_normal")

Callers

nothing calls this directly

Calls 1

_random_fillFunction · 0.85

Tested by

no test coverage detected