Softsign

public class Softsign

Softsign activation function, softsign(x) = x / (abs(x) + 1).

Example Usage:

     Operand<TFloat32> input = tf.constant(
              new float[] {-1.0f, 0.0f, 1.0f});
     Softsign<TFloat32> softsign = new Softsign<>(tf);
     Operand<TFloat32> result = softsign.call(input);
     // result is [-0.5f, 0.f, 0.5f]
 

Public Constructors

Softsign(Ops tf)
Creates a Softsign activation.

Public Methods

Operand<T>
call(Operand<T> input)
Gets the calculation operation for the activation.

Inherited Methods

Public Constructors

public Softsign (Ops tf)

Creates a Softsign activation.

Parameters
tf the TensorFlow Ops

Public Methods

public Operand<T> call (Operand<T> input)

Gets the calculation operation for the activation.

Parameters
input the input tensor
Returns
  • The operand for the activation