randn#
- deeptrack.backend.array_api_compat_ext.torch.random.randn(*size: int) Tensor#
Sample from the standard normal distribution.
This function mirrors numpy.random.randn, i.e. it takes the output shape as positional integer arguments.
Parameters#
- *size: int
Output shape given as positional integers. If empty, returns a scalar 0D tensor.
Returns#
- torch.Tensor
A tensor of shape size (or scalar if size is empty) with values sampled from a standard normal distribution.
Examples#
>>> import deeptrack.backend.array_api_compat_ext.torch.random as rnd
>>> rnd.randn(2, 3).shape torch.Size([2, 3])
Scalar sample:
>>> rnd.randn() tensor(-2.2435)