oa::ml::loss::ppo

Compose PPO policy, value, entropy, and total losses. All four outputs are FP32 scalars under one semantic PPO operation. Old log probability, advantage, and target return remain detached by their child operation contracts. Errors Returns an error unless all rollout fields are matching nonempty same-engine FP32 matrices and every coefficient is valid.

FnRust public API

Function Documentation

pub fn ppo( new_log_probability: &Matrix, old_log_probability: &Matrix, advantage: &Matrix, value: &Matrix, target_return: &Matrix, entropy: &Matrix, config: PpoLossConfig ) -> Result<PpoLossResult>
Compose PPO policy, value, entropy, and total losses. All four outputs are FP32 scalars under one semantic PPO operation. Old log probability, advantage, and target return remain detached by their child operation contracts. Errors Returns an error unless all rollout fields are matching nonempty same-engine FP32 matrices and every coefficient is valid.