class chainer.initializers.GlorotUniform(scale=1.0, dtype=None, **kwargs)[source]

Initializes array with a scaled uniform distribution.

Each element of the array is initialized by the value drawn independently from uniform distribution \([-s, s]\) where \(s = scale \times \sqrt{\frac{6}{fan_{in} + fan_{out}}}\). Here, \(fan_{in}\) and \(fan_{out}\) are the number of input and output units, respectively.

  • ~GlorotUniform.scale (float) – A constant that determines the scale of the uniform distribution.

  • ~GlorotUniform.dtype – Data type specifier.

  • ~GlorotUniform.rng (xp.random.RandomState) – Pseudo-random number generator.



Initializes given array.

This method destructively changes the value of array. The derived class is required to implement this method. The algorithms used to make the new values depend on the concrete derived classes.


array (N-dimensional array) – An array to be initialized by this initializer.

__eq__(value, /)

Return self==value.

__ne__(value, /)

Return self!=value.

__lt__(value, /)

Return self<value.

__le__(value, /)

Return self<=value.

__gt__(value, /)

Return self>value.

__ge__(value, /)

Return self>=value.