Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nn_softmax2d

Softmax2d module


Description

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)

Usage

nn_softmax2d()

Value

a Tensor of the same dimension and shape as the input with values in the range [0, 1]

Shape

  • Input: (N, C, H, W)

  • Output: (N, C, H, W) (same shape as input)

Examples

if (torch_is_installed()) {
m <- nn_softmax2d()
input <- torch_randn(2, 3, 12, 13)
output <- m(input)

}

torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.