autograd::ops
pub fn sigmoid_cross_entropy(y: &Tensor, t: &Tensor) -> Tensor
Computes binary_cross_entropy(sigmoid(y)).
binary_cross_entropy(sigmoid(y))
This function is better than that combination in that it can prevent underflow of log(sigmoid).
log(sigmoid)
y
t
Loss tensor with shape (batch_size, 1)