Class Exponential

java.lang.Object
org.tensorflow.framework.activations.AbstractActivation
org.tensorflow.framework.activations.Exponential
All Implemented Interfaces:
Activation

public class Exponential extends AbstractActivation
Exponential activation function.

For example:

  Operand<TFloat32> input = tf.constant(
         new float[] {-3.0f,-1.0f, 0.0f,1.0f,3.0f});
  Exponential<TFloat32> exp = new Exponential<>(tf);
  Operand<TFloat32> result = exp.call(input);
  // result is [0.04978707f,  0.36787945f,  1.f,  2.7182817f, 20.085537f]

}
  • Field Details

  • Constructor Details

    • Exponential

      public Exponential()
      Creates an Exponential activation.
    • Exponential

      public Exponential(Map<String,Object> config)
      Creates a new Exponential from a configuration Map
      Parameters:
      config - the configuration map, this class does not use any of the entries in the configuration map
      Throws:
      IllegalArgumentException - if the configuration contains unsupported keys for this class or if the value for the name key does not match the name for the Activation
  • Method Details

    • exponential

      public static <T extends TFloating> Operand<T> exponential(Ops tf, Operand<T> input)
      Computes the Exponential activation function.

      Example Usage:

           Operand<TFloat32> input = ...;
           Operand<TFloat32> result = Exponential.exponential(tf, input);
      
      }
      Type Parameters:
      T - the data type for the input
      Parameters:
      tf - the TensorFlow Ops
      input - the input
      Returns:
      the exponential activation: exp(x).
    • getConfig

      public Map<String,Object> getConfig()
      Gets a configuration map
      Specified by:
      getConfig in class AbstractActivation
      Returns:
      the configuration map
    • call

      public <T extends TNumber> Operand<T> call(Ops tf, Operand<T> input)
      Gets the calculation operation for the activation.
      Type Parameters:
      T - the data type of the input and the result
      Parameters:
      tf - the TensorFlow Ops
      input - the input tensor
      Returns:
      The operand for the activation
    • getName

      public String getName()
      Get the name of the activation as known by the TensorFlow Engine
      Specified by:
      getName in class AbstractActivation
      Returns:
      the name of the activation as known by the TensorFlow Engine