class_docstr: This class takes care of the elementwise sum in a residual connection
  It matches the channel dims from two branch flows,
  by either padding or projection if necessary.
class_docstr_tok: ["This","class","takes","care","of","the","elementwise","sum","in","a","residual","connection","It","matches","the","channel","dims","from","two","branch","flows",",","by","either","padding","or","projection","if","necessary","."]
code: def __init__(
      self, func, initializer=None, regularizer=None, name="residual"
  ):
      self.func = look_up_operations(func.upper(), SUPPORTED_OP)
      self.layer_name = "{}_{}".format(name, self.func.lower())
  
      super(ElementwiseLayer, self).__init__(name=self.layer_name)
      self.initializers = {"w": initializer}
      self.regularizers = {"w": regularizer}
  
file_path: NiftyNet/niftynet/layer/elementwise.py
imports: from __future__ import absolute_import, print_function
  import numpy
  import tensorflow
  from niftynet.layer import layer_util
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.convolution import ConvLayer
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 1 to create a new ElementwiseLayer object from inherited base classes: TrainableLayer with example: obj = ElementwiseLayer(func, initializer, regularizer, name)