Function autograd::ops::sigmoid_cross_entropy
[−]
[src]
pub fn sigmoid_cross_entropy(y: &Tensor, t: &Tensor) -> Tensor
Computes binary_cross_entropy(sigmoid(y), t)
.
This function is better than that combination in that it can prevent
underflow of log(sigmoid)
.
Arguments
y
- Tensor with arbitrary shapet
- Tensor with arbitrary shape
Panics
When y.shape != t.shape.
Returns
Loss tensor with same shape as inputs's shapes