docstr: The general connections is::
  
      (inputs)--o-conv_0--conv_1-+-- (outputs)
                |                |
                o----------------o
  
  ``conv_0``, ``conv_1`` layers are specified by ``type_string``.
docstr_tok: ["The","general","connections","is",":",":","(","inputs",")","--","o-conv_0","--","conv_1-+","--","(","outputs",")","|","|","o","--","--","--","--","--","--","--","--","o","``","conv_0","``",",","``","conv_1","``","layers","are","specified","by","``","type_string","``","."]
code: def layer_op(self, inputs, is_training=True):
      """
      The general connections is::
  
          (inputs)--o-conv_0--conv_1-+-- (outputs)
                    |                |
                    o----------------o
  
      ``conv_0``, ``conv_1`` layers are specified by ``type_string``.
      """
      conv_flow = inputs
      # batch normalisation layers
      bn_0 = BNLayer(**self.bn_param)
      bn_1 = BNLayer(**self.bn_param)
      # activation functions //regularisers?
      acti_0 = Acti(func=self.acti_func)
      acti_1 = Acti(func=self.acti_func)
      # convolutions
      conv_0 = Conv(
          acti_func=None,
          with_bias=False,
          feature_normalization=None,
          **self.conv_param,
      )
      conv_1 = Conv(
          acti_func=None,
          with_bias=False,
          feature_normalization=None,
          **self.conv_param,
      )
  
      if self.type_string == "original":
          conv_flow = acti_0(bn_0(conv_0(conv_flow), is_training))
          conv_flow = bn_1(conv_1(conv_flow), is_training)
          conv_flow = ElementwiseLayer("SUM")(conv_flow, inputs)
          conv_flow = acti_1(conv_flow)
          return conv_flow
  
      if self.type_string == "conv_bn_acti":
          conv_flow = acti_0(bn_0(conv_0(conv_flow), is_training))
          conv_flow = acti_1(bn_1(conv_1(conv_flow), is_training))
          return ElementwiseLayer("SUM")(conv_flow, inputs)
  
      if self.type_string == "acti_conv_bn":
          conv_flow = bn_0(conv_0(acti_0(conv_flow)), is_training)
          conv_flow = bn_1(conv_1(acti_1(conv_flow)), is_training)
          return ElementwiseLayer("SUM")(conv_flow, inputs)
  
      if self.type_string == "bn_acti_conv":
          conv_flow = conv_0(acti_0(bn_0(conv_flow, is_training)))
          conv_flow = conv_1(acti_1(bn_1(conv_flow, is_training)))
          return ElementwiseLayer("SUM")(conv_flow, inputs)
  
      raise ValueError("Unknown type string")
  
file_path: NiftyNet/niftynet/layer/residual_unit.py
imports: from __future__ import absolute_import, print_function
  from niftynet.layer.activation import ActiLayer
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.bn import BNLayer
  from niftynet.layer.convolution import ConvolutionalLayer
  from niftynet.layer.elementwise import ElementwiseLayer
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 2 for calling the ResidualUnit obj's underlying member method code with example usage: obj.layer_op(inputs, is_training) and returns: conv_flow, ElementwiseLayer, ElementwiseLayer, ElementwiseLayer