scaled

Scale tensor values.

nothrow @nogc
scaled
(
Scalar
Tensor
)
(
Tensor tensor
,
Scalar alpha = 1
,
Scalar beta = 0
)
if (
isNumeric!Scalar
)
in { static assert (isSlice!Tensor, "Input tensor has to be of type mir.ndslice.slice.Slice."); }

Parameters

tensor
Type: Tensor

Input tensor.

alpha
Type: Scalar

Multiplier value.

beta
Type: Scalar

Offset value.

Performs value modification of tensor elements using following formula:

ref output = alpha * (input) + beta;

Return Value

Type: auto

Scaled input tensor.

Meta