crossEntropy

Creates a cross entropy loss term suitable for multiclass classification problems.

It is assumed that the two input operations are rank-2 tensors, where the first dimension is an index into the batch, and the second index is the index into the label probabilities.

Operation
crossEntropy
(
Operation hypothesis
,
Operation groundTruth
)

Parameters

hypothesis
Type: Operation

The predictions made by a model.

groundTruth
Type: Operation

The true values for the labels, as provided by the training dataset.

Return Value

Type: Operation

An Operation representing the mean cross entropy loss.

Meta