GlorotUniform

class dragon.vm.tensorflow.keras.initializers.GlorotUniform(dtype='float32')[source]

Fill tensor from a glorot uniform distribution.

\[\text{tensor} \sim \mathcal{U}(-\sqrt{\frac{3}{\text{fan\_avg}}}, \sqrt{\frac{3}{\text{fan\_avg}}}) \]

__init__

GlorotUniform.__init__(dtype='float32')[source]

Create a GlorotUniform initializer.

Parameters:
  • dtype (str, optional, default='float32') – The data type to set as default.

Methods

__call__

VarianceScaling.__call__(
  shape,
  dtype=None,
  **kwargs
)[source]

Return a tensor initialized from the initializer.

Parameters:
  • shape (Sequence[int]) – The tensor shape.
  • dtype (str, optional) – The optional data type.
Returns:

dragon.Tensor – The output tensor.