ranged

In-place tensor scaling to fit given value range.

nothrow @nogc
ranged
(
Scalar
Tensor
)
(
Tensor tensor
,
Scalar minValue = 0
,
Scalar maxValue = 1
)
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.

minValue
Type: Scalar

Minimal value output tensor should contain.

maxValue
Type: Scalar

Maximal value output tensor should contain.

Meta