public LossResult(value as Double, gradient as NDArray<T>)
Retains a scalar loss and its gradient without copying the array.
| Parameter | Description |
|---|---|
value | Mean loss. |
gradient | Derivative with the same shape as the outputs. |
result = LossResult<Float>(loss, gradient)