Applies SoftMax over features to each spatial location.
When given an image of Channels x Height x Width
, it will
apply Softmax
to each location \((Channels, h_i, w_j)\)
Examples
if (torch_is_installed()) {
m <- nn_softmax2d()
input <- torch_randn(2, 3, 12, 13)
output <- m(input)
}