Function 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.
Parameters
Name | Description |
---|---|
hypothesis | The predictions made by a model. |
groundTruth | The true values for the labels, as provided by the training dataset. |
Returns
An Operation
representing the mean cross entropy loss.