RandomNormal

class dragon.vm.tensorflow.keras.initializers.RandomNormal(
  mean=0,
  stddev=1,
  dtype='float32'
)[source]

Fill tensor from a normal distribution.

\[\text{tensor} \sim \mathcal{N}(\mu, \sigma^{2}) \]

__init__

RandomNormal.__init__(
  mean=0,
  stddev=1,
  dtype='float32'
)[source]

Create a RandomNormal initializer.

Parameters:
  • mean (number, optional, default=0) The value to \(\mu\).
  • stddev (number, optional, default=1) The value to \(\sigma\).
  • dtype (str, optional, default='float32') The data type to set as default.

Methods

__call__

RandomNormal.__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.