Softmax2d
- class torch.nn.Softmax2d(*args, **kwargs)
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
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
Input: or .
Output: or (same shape as input)
a Tensor of the same dimension and shape as the input with values in the range [0, 1]
None
Examples:
>>> m = nn.Softmax2d()
>>> # you softmax over the 2nd dimension
>>> input = torch.randn(2, 3, 12, 13)
>>> output = m(input)
Runs the forward pass.