Package io.github.kirstenali.deepj.loss
Class MSELoss
java.lang.Object
io.github.kirstenali.deepj.loss.MSELoss
- All Implemented Interfaces:
LossFunction
Mean-Squared-Error loss.
Reduction convention: the loss is averaged over every element
(rows × cols), not just over rows. Consequently the gradient is
2·(predicted − actual) / (rows·cols). This keeps the loss scale independent
of the feature dimension. If a sum reduction or a per-row mean is required, scale the
result accordingly.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MSELoss
public MSELoss()
-
-
Method Details
-
loss
- Specified by:
lossin interfaceLossFunction
-
gradient
- Specified by:
gradientin interfaceLossFunction
-