Interface Activation

All Known Implementing Classes:
AbstractActivation, ELU, Exponential, GELU, HardSigmoid, Linear, ReLU, SELU, Sigmoid, Softmax, Softplus, Softsign, Swish, Tanh
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Activation
Interface for Activations
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends TNumber>
    Operand<T>
    call(Ops tf, Operand<T> input)
    Gets the calculation operation for the activation.
    static Activation
    create(String name)
    Creates an Activation instance based on the name as known to the TensorFlow engine.
    static Activation
    Creates an Activation getInstance based on a configuration as produced by TensorFlow.
  • Method Details

    • create

      static Activation create(String name)
      Creates an Activation instance based on the name as known to the TensorFlow engine.
      Parameters:
      name - the activation name
      Returns:
      the Activation
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if the name is not a known ActivationType
    • create

      static Activation create(Map<String,Object> config)
      Creates an Activation getInstance based on a configuration as produced by TensorFlow.
      Parameters:
      config - a Map object containing the Activation's state. This Map object must contain at least a name key.
      "name" : String - this is the TensorFlow Engine's Activation name
      
      }
      Returns:
      the Activation
      Throws:
      NullPointerException - if config is null, or the activation name is missing from the Map.
      IllegalArgumentException - if the name contained in the config map is not a known ActivationType
    • call

      <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