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

org.tensorflow.framework.activations.Activation
abstract Operand<T>
call(Operand<T> input)
Gets the calculation operation for the activation.
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()

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