oa::ml::policy::evaluate_categorical

Differentiably evaluate stored categorical actions. Gradients flow through logits, log_probability, and entropy; action indices remain discrete. action and value are zero-copy semantic output aliases, matching OA C++. Errors Returns an error when logits are not FP32 [E,A] with E > 0 and A > 1, actions are not I32 [E], values are not FP32 [E], inputs do not share one engine, or composite lowering fails.

FnRust public API

Function Documentation

pub fn evaluate_categorical( logits: &Matrix, action: &Matrix, value: &Matrix ) -> Result<PolicyResult>
Differentiably evaluate stored categorical actions. Gradients flow through logits, log_probability, and entropy; action indices remain discrete. action and value are zero-copy semantic output aliases, matching OA C++. Errors Returns an error when logits are not FP32 [E,A] with E > 0 and A > 1, actions are not I32 [E], values are not FP32 [E], inputs do not share one engine, or composite lowering fails.