parameters: (
      inputs,
      kernel_size,
      stride=1,
      padding='SAME',
      activation_fn=nn.relu,
      normalizer_fn=None,
      normalizer_params=None,
      weights_initializer=initializers.xavier_initializer(),
      weights_regularizer=None,
      biases_initializer=init_ops.zeros_initializer(),
      biases_regularizer=None,
      reuse=None,
      variables_collections=None,
      outputs_collections=None,
      trainable=True,
      scope=None)
docstring: Performs the same in-plane convolution to each channel independently.
  
    This is useful for performing various simple channel-independent convolution
    operations such as image gradients:
  
      image = tf.constant(..., shape=(16, 240, 320, 3))
      vert_gradients = layers.conv2d_in_plane(image,
                                              kernel=[1, -1],
                                              kernel_size=[2, 1])
      horz_gradients = layers.conv2d_in_plane(image,
                                              kernel=[1, -1],
                                              kernel_size=[1, 2])
  
    Args:
      inputs: A 4-D tensor with dimensions [batch_size, height, width, channels].
      kernel_size: A list of length 2 holding the [kernel_height, kernel_width] of
        of the pooling. Can be an int if both values are the same.
      stride: A list of length 2 `[stride_height, stride_width]`. Can be an int if
        both strides are the same. Note that presently both strides must have the
        same value.
      padding: The padding type to use, either 'SAME' or 'VALID'.
      activation_fn: Activation function. The default value is a ReLU function.
        Explicitly set it to None to skip it and maintain a linear activation.
      normalizer_fn: Normalization function to use instead of `biases`. If
        `normalizer_fn` is provided then `biases_initializer` and
        `biases_regularizer` are ignored and `biases` are not created nor added.
        default set to None for no normalizer function
      normalizer_params: Normalization function parameters.
      weights_initializer: An initializer for the weights.
      weights_regularizer: Optional regularizer for the weights.
      biases_initializer: An initializer for the biases. If None skip biases.
      biases_regularizer: Optional regularizer for the biases.
      reuse: Whether or not the layer and its variables should be reused. To be
        able to reuse the layer scope must be given.
      variables_collections: Optional list of collections for all the variables or
        a dictionary containing a different list of collection per variable.
      outputs_collections: Collection to add the outputs.
      trainable: If `True` also add variables to the graph collection
        `GraphKeys.TRAINABLE_VARIABLES` (see tf.Variable).
      scope: Optional scope for `variable_scope`.
  
    Returns:
      A `Tensor` representing the output of the operation.
docstring_summary: Performs the same in-plane convolution to each channel independently.
docstring_tokens: Performs the same in - plane convolution to each channel independently .
function: def convolution2d_in_plane(
      inputs,
      kernel_size,
      stride=1,
      padding='SAME',
      activation_fn=nn.relu,
      normalizer_fn=None,
      normalizer_params=None,
      weights_initializer=initializers.xavier_initializer(),
      weights_regularizer=None,
      biases_initializer=init_ops.zeros_initializer(),
      biases_regularizer=None,
      reuse=None,
      variables_collections=None,
      outputs_collections=None,
      trainable=True,
      scope=None):
    """Performs the same in-plane convolution to each channel independently.
  
    This is useful for performing various simple channel-independent convolution
    operations such as image gradients:
  
      image = tf.constant(..., shape=(16, 240, 320, 3))
      vert_gradients = layers.conv2d_in_plane(image,
                                              kernel=[1, -1],
                                              kernel_size=[2, 1])
      horz_gradients = layers.conv2d_in_plane(image,
                                              kernel=[1, -1],
                                              kernel_size=[1, 2])
  
    Args:
      inputs: A 4-D tensor with dimensions [batch_size, height, width, channels].
      kernel_size: A list of length 2 holding the [kernel_height, kernel_width] of
        of the pooling. Can be an int if both values are the same.
      stride: A list of length 2 `[stride_height, stride_width]`. Can be an int if
        both strides are the same. Note that presently both strides must have the
        same value.
      padding: The padding type to use, either 'SAME' or 'VALID'.
      activation_fn: Activation function. The default value is a ReLU function.
        Explicitly set it to None to skip it and maintain a linear activation.
      normalizer_fn: Normalization function to use instead of `biases`. If
        `normalizer_fn` is provided then `biases_initializer` and
        `biases_regularizer` are ignored and `biases` are not created nor added.
        default set to None for no normalizer function
      normalizer_params: Normalization function parameters.
      weights_initializer: An initializer for the weights.
      weights_regularizer: Optional regularizer for the weights.
      biases_initializer: An initializer for the biases. If None skip biases.
      biases_regularizer: Optional regularizer for the biases.
      reuse: Whether or not the layer and its variables should be reused. To be
        able to reuse the layer scope must be given.
      variables_collections: Optional list of collections for all the variables or
        a dictionary containing a different list of collection per variable.
      outputs_collections: Collection to add the outputs.
      trainable: If `True` also add variables to the graph collection
        `GraphKeys.TRAINABLE_VARIABLES` (see tf.Variable).
      scope: Optional scope for `variable_scope`.
  
    Returns:
      A `Tensor` representing the output of the operation.
    """
    with variable_scope.variable_scope(
        scope, 'ConvInPlane', [inputs], reuse=reuse) as sc:
      dtype = inputs.dtype.base_dtype
      kernel_h, kernel_w = utils.two_element_tuple(kernel_size)
      stride_h, stride_w = utils.two_element_tuple(stride)
      num_filters_in = utils.last_dimension(inputs.get_shape(), min_rank=4)
      weights_shape = [kernel_h, kernel_w, 1, 1]
      weights_collections = utils.get_variable_collections(
          variables_collections, 'weights')
      weights = variables.model_variable(
          'weights',
          shape=weights_shape,
          dtype=dtype,
          initializer=weights_initializer,
          regularizer=weights_regularizer,
          collections=weights_collections,
          trainable=trainable)
      depthwise_weights = array_ops.tile(weights, [1, 1, num_filters_in, 1])
      outputs = nn.depthwise_conv2d(inputs, depthwise_weights,
                                    [1, stride_h, stride_w, 1], padding)
      if normalizer_fn is not None:
        normalizer_params = normalizer_params or {}
        outputs = normalizer_fn(outputs, **normalizer_params)
      else:
        if biases_initializer is not None:
          biases_collections = utils.get_variable_collections(
              variables_collections, 'biases')
          biases = variables.model_variable(
              'biases',
              shape=[
                  num_filters_in,
              ],
              dtype=dtype,
              initializer=biases_initializer,
              regularizer=biases_regularizer,
              collections=biases_collections,
              trainable=trainable)
          outputs = nn.bias_add(outputs, biases)
  
      if activation_fn is not None:
        outputs = activation_fn(outputs)
      return utils.collect_named_outputs(outputs_collections, sc.name, outputs)
function_tokens: def convolution2d_in_plane ( inputs , kernel_size , stride = 1 , padding = 'SAME' , activation_fn = nn . relu , normalizer_fn = None , normalizer_params = None , weights_initializer = initializers . xavier_initializer ( ) , weights_regularizer = None , biases_initializer = init_ops . zeros_initializer ( ) , biases_regularizer = None , reuse = None , variables_collections = None , outputs_collections = None , trainable = True , scope = None ) : with variable_scope . variable_scope ( scope , 'ConvInPlane' , [ inputs ] , reuse = reuse ) as sc : dtype = inputs . dtype . base_dtype kernel_h , kernel_w = utils . two_element_tuple ( kernel_size ) stride_h , stride_w = utils . two_element_tuple ( stride ) num_filters_in = utils . last_dimension ( inputs . get_shape ( ) , min_rank = 4 ) weights_shape = [ kernel_h , kernel_w , 1 , 1 ] weights_collections = utils . get_variable_collections ( variables_collections , 'weights' ) weights = variables . model_variable ( 'weights' , shape = weights_shape , dtype = dtype , initializer = weights_initializer , regularizer = weights_regularizer , collections = weights_collections , trainable = trainable ) depthwise_weights = array_ops . tile ( weights , [ 1 , 1 , num_filters_in , 1 ] ) outputs = nn . depthwise_conv2d ( inputs , depthwise_weights , [ 1 , stride_h , stride_w , 1 ] , padding ) if normalizer_fn is not None : normalizer_params = normalizer_params or { } outputs = normalizer_fn ( outputs , * * normalizer_params ) else : if biases_initializer is not None : biases_collections = utils . get_variable_collections ( variables_collections , 'biases' ) biases = variables . model_variable ( 'biases' , shape = [ num_filters_in , ] , dtype = dtype , initializer = biases_initializer , regularizer = biases_regularizer , collections = biases_collections , trainable = trainable ) outputs = nn . bias_add ( outputs , biases ) if activation_fn is not None : outputs = activation_fn ( outputs ) return utils . collect_named_outputs ( outputs_collections , sc . name , outputs )