oa::FnLoss::crossEntropy

crossEntropy: Mean cross-entropy over rank-two logits and UInt8, UInt32, or non-negative Int32 class-index targets; the scalar result is Float32, and an out-of-range target produces NaN without an out-of-bounds read.

Function Documentation

oa::Matrix oa::FnLoss::crossEntropy( const oa::Matrix & inLogits, const oa::Matrix & inTargets )
crossEntropy: Mean cross-entropy over rank-two logits and UInt8, UInt32, or non-negative Int32 class-index targets; the scalar result is Float32, and an out-of-range target produces NaN without an out-of-bounds read.

Parameters

inLogits
const oa::Matrix &

inTargets
const oa::Matrix &

Returns

oa::Matrix

The declared return value.

Examples