oa::ml::loss::sac_critic

Compose the donor twin-critic SAC objective. The target is reward + discount * (min(next_q1, next_q2) - alpha * next_log_probability) outside terminal states. Truncation retains that bootstrap. All next-state target fields are detached from reverse mode. Errors Returns an error unless all numerical fields are matching nonempty same-engine F32 vectors, both boundary masks are matching U8 vectors, discount is finite in [0, 1], entropy coefficient is non-negative and finite, the batch fits the shader ABI, and lowering succeeds.

FnRust public API

Function Documentation

pub fn sac_critic( q1: &Matrix, q2: &Matrix, reward: &Matrix, next_q1: &Matrix, next_q2: &Matrix, next_log_probability: &Matrix, terminated: &Matrix, truncated: &Matrix, config: SacLossConfig ) -> Result<SacCriticLossResult>
Compose the donor twin-critic SAC objective. The target is reward + discount * (min(next_q1, next_q2) - alpha * next_log_probability) outside terminal states. Truncation retains that bootstrap. All next-state target fields are detached from reverse mode. Errors Returns an error unless all numerical fields are matching nonempty same-engine F32 vectors, both boundary masks are matching U8 vectors, discount is finite in [0, 1], entropy coefficient is non-negative and finite, the batch fits the shader ABI, and lowering succeeds.