truncated_normal

dragon.vm.tensorflow.random.truncated_normal(
  shape,
  mean=0.0,
  stddev=1.0,
  dtype='float32',
  seed=None,
  name=None
)[source]

Return a tensor initialized from the truncated normal distribution.

\[\text{out} \sim \mathcal{TN}(\mu, \sigma^{2}, \mu - 2\sigma, \mu + 2\sigma) \]
Parameters:
  • shape (Sequence[Union[int, dragon.Tensor]]) The shape of the tensor.
  • mean (number, optional, default=0) The value to \(\mu\).
  • stddev (number, optional, default=1) The value to \(\sigma\).
  • dtype (str, optional) The optional data type.
  • seed (int, optional) The optional random seed.
  • name (str, optional) The operation name.
Returns:

dragon.Tensor The output tensor.