normal_like

dragon.random.normal_like(
  other,
  mean=0,
  std=1,
  dtype='float32',
  **kwargs
)

Return a tensor shaping like another initialized from the normal distribution.

The RandomNormal distribution is defined as:

\[X \sim N(\mu, \sigma) \]
Parameters:
  • other (dragon.Tensor) – The tensor to hint the shape.
  • mean (number, optional, default=0) – The value of \(\mu\).
  • std (number, optional, default=1) – The value of \(\sigma\).
  • dtype (str, optional, default='float32') – The optional data type.
Returns:

dragon.Tensor – The output tensor.