LossFunction

abstract class LossFunction(reductionType: ReductionType)

Basic interface for all loss functions.

Constructors

LossFunction
Link copied to clipboard
fun LossFunction(reductionType: ReductionType)

Functions

apply
Link copied to clipboard
abstract fun apply(tf: Ops, yPred: Operand<Float>, yTrue: Operand<Float>, numberOfLosses: Operand<Float>?): Operand<Float>

Applies LossFunction to the yPred labels predicted by the model and known yTrue hidden during training.

Properties

reductionType
Link copied to clipboard
val reductionType: ReductionType

Reduction type. Should be defined in subclass

Inheritors

SoftmaxCrossEntropyWithLogits
Link copied to clipboard
MSE
Link copied to clipboard
MAE
Link copied to clipboard
MAPE
Link copied to clipboard
MSLE
Link copied to clipboard
Poisson
Link copied to clipboard
Hinge
Link copied to clipboard
SquaredHinge
Link copied to clipboard
LogCosh
Link copied to clipboard
Huber
Link copied to clipboard
BinaryCrossEntropy
Link copied to clipboard