class_docstr: Activation layer (specification key: `activation`).
  
  Args:
      nonlinearity ('crelu' | 'elu' | 'leaky-relu' | 'none' | 'relu' | 'selu' | 'sigmoid' |
          'softmax' | 'softplus' | 'softsign' | 'swish' | 'tanh'): Nonlinearity
          (<span style="color:#C00000"><b>required</b></span>).
      name (string): Layer name
          (<span style="color:#00C000"><b>default</b></span>: internally chosen).
      input_spec (specification): <span style="color:#00C000"><b>internal use</b></span>.
class_docstr_tok: ["Activation","layer","(","specification","key",":","`","activation","`",")",".","Args",":","nonlinearity","(","'crelu","'","|","'elu","'","|","'leaky-relu","'","|","'none","'","|","'relu","'","|","'selu","'","|","'sigmoid","'","|","'softmax","'","|","'softplus","'","|","'softsign","'","|","'swish","'","|","'tanh","'",")",":","Nonlinearity","(","<","span","style=","''","color",":","#","C00000","''",">","<","b",">","required","<","\/b",">","<","\/span",">",")",".","name","(","string",")",":","Layer","name","(","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","default","<","\/b",">","<","\/span",">",":","internally","chosen",")",".","input_spec","(","specification",")",":","<","span","style=","''","color",":","#","00C000","''",">","<","b",">","internal","use","<","\/b",">","<","\/span",">","."]
code: def __init__(self, *, nonlinearity, name=None, input_spec=None):
      super().__init__(name=name, input_spec=input_spec)
  
      # Nonlinearity
      if nonlinearity not in (
          "crelu",
          "elu",
          "leaky-relu",
          "none",
          "relu",
          "selu",
          "sigmoid",
          "softmax",
          "softplus",
          "softsign",
          "swish",
          "tanh",
      ):
          raise TensorforceError.value(
              name="activation",
              argument="nonlinearity",
              value=nonlinearity,
          )
      self.nonlinearity = nonlinearity
  
      self.architecture_kwargs["nonlinearity"] = nonlinearity
  
imports: import math
  import random
  import numpy
  import tensorflow
  from tensorforce import TensorforceError, util
  from tensorforce.core import parameter_modules, TensorSpec, tf_function, tf_util
  from tensorforce.core.layers import Layer, NondeterministicLayer
label_desc: Use image node_id 1 to create a new Activation object from inherited base classes: Layer with example: obj = Activation()