eazygrad.bce_with_logits_loss¶
- eazygrad.bce_with_logits_loss(logits: _Tensor, target: _Tensor) _Tensor[source]¶
Compute binary cross-entropy loss from unnormalized logits.
- Parameters:
- Returns:
_Tensor – Scalar loss tensor.
Notes
This implementation uses a numerically stable formulation and internally averages the per-element loss.