code: def split_conv(
      input_tensor,
      num_outputs,
      num_ways,
      scope,
      divisible_by=8,
      **kwargs,
  ):
      """Creates a split convolution.
  
      Split convolution splits the input and output into
      'num_blocks' blocks of approximately the same size each,
      and only connects $i$-th input to $i$ output.
  
      Args:
        input_tensor: input tensor
        num_outputs: number of output filters
        num_ways: num blocks to split by.
        scope: scope for all the operators.
        divisible_by: make sure that every part is divisiable by this.
        **kwargs: will be passed directly into conv2d operator
      Returns:
        tensor
      """
      b = input_tensor.get_shape().as_list()[3]
  
      if (
          num_ways == 1
          or min(b // num_ways, num_outputs // num_ways) < divisible_by
      ):
          # Don't do any splitting if we end up with less than 8 filters
          # on either side.
          return slim.conv2d(
              input_tensor, num_outputs, [1, 1], scope=scope, **kwargs
          )
  
      outs = []
      input_splits = _split_divisible(
          b, num_ways, divisible_by=divisible_by
      )
      output_splits = _split_divisible(
          num_outputs, num_ways, divisible_by=divisible_by
      )
      inputs = tf.split(
          input_tensor, input_splits, axis=3, name="split_" + scope
      )
      base = scope
      for i, (input_tensor, out_size) in enumerate(
          zip(inputs, output_splits)
      ):
          scope = base + "_part_%d" % (i,)
          n = slim.conv2d(
              input_tensor, out_size, [1, 1], scope=scope, **kwargs
          )
          n = tf.identity(n, scope + "_output")
          outs.append(n)
      return tf.concat(outs, 3, name=scope + "_concat")
  
file_path: MMdnn/mmdnn/conversion/examples/tensorflow/models/mobilenet/conv_blocks.py
imports: import contextlib
  import functools
  import tensorflow
label_desc: Use image node_id 8 for calling a global function with example usage: split_conv(input_tensor, num_outputs, num_ways, scope, divisible_by) and returns: tf, slim