Class Tanh

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

public class Tanh extends ActivationFunction
Hyperbolic Tangent activation function.
See Also:
  • Constructor Details Link icon

    • Tanh Link icon

      public Tanh(boolean inplace)
      Constructor.
      Parameters:
      inplace - true if the operation executes in-place.
  • Method Details Link icon

    • forward Link icon

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