Function burn::tensor::activation::softmin
pub fn softmin<const D: usize, B>(
tensor: Tensor<B, D>,
dim: usize,
) -> Tensor<B, D>where
B: Backend,
Expand description
Applies the softmin function on the input tensor along the given dimension.
softmin(x_i) = exp(-x_i) / sum_j(exp(-x_j))
ยงNotes
The dimension argument dim
specifies the dimension along which the function will be computed.
It must in the range of 0
and D-1
.