randn_like#
- class brainpy.math.random.randn_like(input, *, dtype=None, key=None)[source]#
Similar to
randn_like
in torch.Returns a tensor with the same size as
input
that is filled with random numbers from a normal distribution with mean 0 and variance 1.- Parameters:
input – the
size
of input will determine size of the output tensor.dtype – the desired data type of returned Tensor. Default: if
None
, defaults to the dtype of input.key – the seed or key for the random.
- Returns:
The random data.