parameters: (self, input_var, act=None, use_cudnn=None)
docstring: Append activation
  
              Args:
                  input_var: the input variable. The len(input_var.shape) is
                  larger or equal than 2.
                  act: activation type
                  use_cudnn: if use cudnn
  
          Return the Variable of after append activation
docstring_summary: Append activation
docstring_tokens: Append activation
function: def append_activation(self, input_var, act=None, use_cudnn=None):
          """Append activation
  
              Args:
                  input_var: the input variable. The len(input_var.shape) is
                  larger or equal than 2.
                  act: activation type
                  use_cudnn: if use cudnn
  
          Return the Variable of after append activation
          """
          act = act
          if act is None:
              return input_var
          if isinstance(act, six.string_types):
              act = {'type': act}
          else:
              raise TypeError(
                  str(act) + " should be unicode or str in %s ", self.name)
  
          if (use_cudnn is not None) and use_cudnn:
              act['use_cudnn'] = use_cudnn
          use_mkldnn = _global_flags()["FLAGS_use_mkldnn"]
          if (use_mkldnn is not None) and use_mkldnn:
              act['use_mkldnn'] = use_mkldnn
          act_type = act.pop('type')
          if in_dygraph_mode():
              res = _append_activation_in_dygraph(input_var, act_type, use_cudnn,
                                                  use_mkldnn)
              return res
          else:
              tmp = self.create_variable_for_type_inference(dtype=input_var.dtype)
              self.append_op(
                  type=act_type,
                  inputs={"X": [input_var]},
                  outputs={"Out": [tmp]},
                  attrs=act)
              return tmp
function_tokens: def append_activation ( self , input_var , act = None , use_cudnn = None ) : act = act if act is None : return input_var if isinstance ( act , six . string_types ) : act = { 'type' : act } else : raise TypeError ( str ( act ) + " should be unicode or str in %s " , self . name ) if ( use_cudnn is not None ) and use_cudnn : act [ 'use_cudnn' ] = use_cudnn use_mkldnn = _global_flags ( ) [ "FLAGS_use_mkldnn" ] if ( use_mkldnn is not None ) and use_mkldnn : act [ 'use_mkldnn' ] = use_mkldnn act_type = act . pop ( 'type' ) if in_dygraph_mode ( ) : res = _append_activation_in_dygraph ( input_var , act_type , use_cudnn , use_mkldnn ) return res else : tmp = self . create_variable_for_type_inference ( dtype = input_var . dtype ) self . append_op ( type = act_type , inputs = { "X" : [ input_var ] } , outputs = { "Out" : [ tmp ] } , attrs = act ) return tmp