oa::matrix::categorical_accuracy_count

Count rows whose last-axis FP32 argmax equals the integer class label. The returned [1] U32 Matrix remains device-resident. Reading it is an explicit synchronization boundary. Errors Returns an error when logits are not a nonempty rank-two-or-greater FP32 Matrix, labels do not match the leading logits shape or use U8/U32/I32, inputs belong to different engines, a size exceeds the shader ABI, allocation fails, or recording fails.

FnRust public API

Function Documentation

pub fn categorical_accuracy_count( logits: &Matrix, labels: &Matrix ) -> Result<Matrix>
Count rows whose last-axis FP32 argmax equals the integer class label. The returned [1] U32 Matrix remains device-resident. Reading it is an explicit synchronization boundary. Errors Returns an error when logits are not a nonempty rank-two-or-greater FP32 Matrix, labels do not match the leading logits shape or use U8/U32/I32, inputs belong to different engines, a size exceeds the shader ABI, allocation fails, or recording fails.