public interface SupervisedLoss<T extends AbstractFloat = Float, Targets extends AbstractNumber = Int>
Typed mean supervised objective. Target storage is part of the contract: integer class indices and floating regression values are not interchangeable.
loss as SupervisedLoss<Float, Float> = MeanSquaredError<Float>()
| Modifier and Type | Member | Description |
|---|---|---|
| public | computecompute(outputs as NDArray<T>, targets as NDArray<Targets>, gradientScale as Double = 1.0) as LossResult<T> |
Computes mean loss and its derivative without changing either input. |