Function burn::tensor::loss::cross_entropy_with_logits

pub fn cross_entropy_with_logits<B, const D: usize>(
    logits: Tensor<B, D>,
    target_probs: Tensor<B, D>,
) -> Tensor<B, 1>
where B: Backend,
Expand description

Computes the log softmax cross entropy between logits and target probabilities.

§Arguments

  • logits - The logits.
  • target_probs - The target probabilities.

§Returns

The log softmax cross entropy.