code: def init(images, num_channels, dim='2d', stride=2,
           kernel_size=7, maxpool=True, training=True, scope='init'):
    
    conv = CONFIG[dim]['conv']
    pool = CONFIG[dim]['max_pool']
    with tf.variable_scope(scope):
      net = conv(images, num_channels, kernel_size, strides=stride,
                 padding='SAME', activation=None)
      net = tf.layers.batch_normalization(net, training=training)
      net = tf.nn.relu(net)
      if maxpool:
        net = pool(net, pool_size=3, strides=stride)
      x1, x2 = tf.split(net, 2, axis=CONFIG[dim]['split_axis'])
      return x1, x2
docs: Standard ResNet initial block used as first RevNet block.
  
    Args:
      images: [N, H, W, 3] tensor of input images to the model.
      num_channels: Output depth of convolutional layer in initial block.
      dim: '2d' if 2-dimensional, '3d' if 3-dimensional.
      stride: stride for the convolution and pool layer.
      kernel_size: Size of the initial convolution filter
      maxpool: If true, apply a maxpool after the convolution
      training: True for train phase, False for eval phase.
      scope: Optional scope for the init block.
  
    Returns:
      Two [N, H, W, C] output activations from input images.