class_docstr: Apply an element-wise non-linear activation function.
  'Prelu' uses trainable parameters and those are initialised to zeros
  Dropout function is also supported
class_docstr_tok: ["Apply","an","element-wise","non-linear","activation","function",".","'Prelu","'","uses","trainable","parameters","and","those","are","initialised","to","zeros","Dropout","function","is","also","supported"]
code: def layer_op(self, input_tensor, keep_prob=None):
      func_ = look_up_operations(self.func, SUPPORTED_OP)
      if self.func == "prelu":
          alphas = tf.get_variable(
              "alpha",
              input_tensor.shape[-1],
              initializer=self.initializers["alpha"],
              regularizer=self.regularizers["alpha"],
          )
          output_tensor = func_(input_tensor, alphas)
      elif self.func == "dropout":
          output_tensor = func_(
              input_tensor, keep_prob=keep_prob, name="dropout"
          )
      else:
          output_tensor = func_(input_tensor, name="acti")
      return output_tensor
  
file_path: NiftyNet/niftynet/layer/activation.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 2 for calling the ActiLayer obj's underlying member method code with example usage: obj.layer_op(input_tensor, keep_prob) and returns: output_tensor