ClikaRT::ops::randn
function
randn()
Tensor randn(
ClikaRT::Span<const ScalarOrTensor> shape,
DataType dtype = DataType::Float32,
StreamOrDevice s = {}
)
Standard-normal random tensor, N(0, 1).
Parameters
shape: the output shape (each extent a scalar or 0-D tensor).dtype: output float dtype; defaultFloat32.s: stream or device; default = the default device.
Returns: a shape-shaped tensor of normal draws.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) on a non-floatdtype.
auto noise = ClikaRT::ops::randn({batch, dim});
Declared in ClikaRT/compute/ops.h, line 4122