Class Softmax

All Implemented Interfaces:
Serializable, Function<Tensor,Tensor>, Layer

public class Softmax extends ActivationFunction
Softmax activation function.
See Also:
  • Constructor Details

    • Softmax

      public Softmax()
      Constructor.
    • Softmax

      public Softmax(int dim)
      Constructor.
      Parameters:
      dim - the dimension along which softmax will be computed.
  • Method Details

    • forward

      public Tensor forward(Tensor x)
      Description copied from interface: Layer
      Forward propagation (or forward pass) through the layer.
      Parameters:
      x - the input tensor.
      Returns:
      the output tensor.