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

Function glorot_normal

python/singa/initializer.py:97–112  ·  view source on GitHub ↗

Glorot normal initializer, also called Xavier normal initializer. It draws samples from a normal distribution centered on 0 with `stddev = sqrt(2 / (fan_in + fan_out))` where `fan_in` is the number of input units in the weight tensor and `fan_out` is the number of output units in th

(t)

Source from the content-addressed store, hash-verified

95
96
97def glorot_normal(t):
98 """Glorot normal initializer, also called Xavier normal initializer.
99
100 It draws samples from a normal distribution centered on 0
101 with `stddev = sqrt(2 / (fan_in + fan_out))`
102 where `fan_in` is the number of input units in the weight tensor
103 and `fan_out` is the number of output units in the weight tensor.
104
105 # Arguments
106 t(Tensor):the tensor to be filled in.
107
108 # References
109 - [Understanding the difficulty of training deep feedforward neural
110 networks](http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf)
111 """
112 _random_fill(t, scale=1., mode='fan_avg', distribution='normal')
113
114
115def glorot_uniform(t):

Callers

nothing calls this directly

Calls 1

_random_fillFunction · 0.85

Tested by

no test coverage detected