Package io.github.kirstenali.deepj.loss
Class CrossEntropyLoss
java.lang.Object
io.github.kirstenali.deepj.loss.CrossEntropyLoss
- All Implemented Interfaces:
LossFunction
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tensorstatic TensorfromIntTargets(int[] targets) static Tensorstatic Tensorstatic floatstatic floatfloatstatic CrossEntropyResultstatic int[]toIntTargets(Tensor actual)
-
Constructor Details
-
CrossEntropyLoss
public CrossEntropyLoss()
-
-
Method Details
-
forward
- Specified by:
forwardin interfaceLossFunction
-
forward
-
loss
- Specified by:
lossin interfaceLossFunction
-
gradient
- Specified by:
gradientin interfaceLossFunction
-
loss
-
gradient
-
result
-
loss
-
gradient
-
toIntTargets
-
fromIntTargets
-