Softmax
torch.nn.modules.activation.Softmax
final class Softmax[D <: DType](dim: Int)(implicit evidence$1: Default[D]) extends TensorModule[D]
Applies the Softmax function to an n-dimensional input Tensor rescaling them so that the elements of the n-dimensional output Tensor lie in the range [0,1] and sum to 1.
Softmax is defined as: $$\text{Softmax}(x_{i}) = \frac{\exp(x_i)}{\sum_j \exp(x_j)}$$
When the input Tensor is a sparse tensor then the unspecifed values are treated as -inf
.
Attributes
- Source
- Softmax.scala
- Graph
-
- Supertypes
Members list
Value members
Inherited methods
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Adds a buffer to the module.
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Attributes
- Inherited from:
- Module
- Source
- Module.scala
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
- Inherited from:
- TensorModule
- Source
- Module.scala
Concrete fields
Attributes
- Source
- Softmax.scala
In this article