code: def upscore_layer_3d(
      inputs,
      inputs2,
      out_filters,
      in_filters=None,
      strides=(2, 2, 2),
      mode=tf.estimator.ModeKeys.EVAL,
      use_bias=False,
      kernel_initializer=tf.initializers.variance_scaling(
          distribution="uniform"
      ),
      bias_initializer=tf.zeros_initializer(),
      kernel_regularizer=None,
      bias_regularizer=None,
  ):
      """Upscore layer according to [1].
  
      [1] J. Long et al. Fully convolutional networks for semantic segmentation.
      CVPR 2015.
  
      Args:
          inputs (tf.Tensor): Input features to be upscored.
          inputs2 (tf.Tensor): Higher resolution features from the encoder to add.
              out_filters (int): Number of output filters (typically, number of
              segmentation classes)
          in_filters (None, optional): None or number of input filters.
          strides (tuple, optional): Upsampling factor for a strided transpose
              convolution.
          mode (TYPE, optional): One of the tf.estimator.ModeKeys strings: TRAIN,
              EVAL or PREDICT
          use_bias (bool, optional): Boolean, whether the layer uses a bias.
          kernel_initializer (TYPE, optional): An initializer for the convolution
              kernel.
          bias_initializer (TYPE, optional): An initializer for the bias vector.
              If None, no bias will be applied.
          kernel_regularizer (None, optional): Optional regularizer for the
              convolution kernel.
          bias_regularizer (None, optional): Optional regularizer for the bias
              vector.
  
      Returns:
          tf.Tensor: Upscore tensor
  
      """
      conv_params = {
          "use_bias": use_bias,
          "kernel_initializer": kernel_initializer,
          "bias_initializer": bias_initializer,
          "kernel_regularizer": kernel_regularizer,
          "bias_regularizer": bias_regularizer,
      }
  
      # Compute an upsampling shape dynamically from the input tensor. Input
      # filters are required to be static.
      if in_filters is None:
          in_filters = inputs.get_shape().as_list()[-1]
  
      assert (
          len(inputs.get_shape().as_list()) == 5
      ), "inputs are required to have a rank of 5."
      assert len(inputs.get_shape().as_list()) == len(
          inputs2.get_shape().as_list()
      ), "Ranks of input and input2 differ"
  
      # Account for differences in the number of input and output filters
      if in_filters != out_filters:
          x = tf.layers.conv3d(
              inputs=inputs,
              filters=out_filters,
              kernel_size=(1, 1, 1),
              strides=(1, 1, 1),
              padding="same",
              name="filter_conversion",
              **conv_params,
          )
      else:
          x = inputs
  
      # Upsample inputs
      x = linear_upsample_3d(inputs=x, strides=strides)
  
      # Skip connection
      x2 = tf.layers.conv3d(
          inputs=inputs2,
          filters=out_filters,
          kernel_size=(1, 1, 1),
          strides=(1, 1, 1),
          padding="same",
          **conv_params,
      )
  
      x2 = tf.layers.batch_normalization(
          x2, training=mode == tf.estimator.ModeKeys.TRAIN
      )
  
      # Return the element-wise sum
      return tf.add(x, x2)
  
file_path: DLTK/dltk/networks/segmentation/fcn.py
imports: from __future__ import unicode_literals
  from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import tensorflow
  from dltk.core.residual_unit import vanilla_residual_unit_3d
  from dltk.core.upsample import linear_upsample_3d
label_desc: Use image node_id 1 for calling a global function with example usage: upscore_layer_3d(inputs, inputs2, out_filters, in_filters, strides, mode, use_bias, kernel_initializer, bias_initializer, kernel_regularizer, bias_regularizer) and returns: tf