Realm

oa::ml::loss::poisson_nll

Compute the Poisson negative log likelihood mean(exp(input) - target * input) for log-rate input. Matches the donor’s log_input contract: input is the log-rate, so the rate is exp(input). The Stirling correction (full) is not part of this contract. Errors Returns an error for mismatched, empty, or non-FP32 inputs, or when runtime recording fails.

FnRust public API

Function Documentation

pub fn poisson_nll( input: &Matrix, target: &Matrix ) -> Result<Matrix>
Compute the Poisson negative log likelihood mean(exp(input) - target * input) for log-rate input. Matches the donor’s log_input contract: input is the log-rate, so the rate is exp(input). The Stirling correction (full) is not part of this contract. Errors Returns an error for mismatched, empty, or non-FP32 inputs, or when runtime recording fails.