tf.contrib.layers.convolution2d_in_plane(*args, **kwargs)
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, set to None to skip it and maintain a linear activation. -
normalizer_fn
: normalization function to use instead ofbiases
. Ifnormalizer_fn
is provided thenbiases_initializer
andbiases_regularizer
are ignored andbiases
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 dictionay containing a different list of collection per variable. -
outputs_collections
: collection to add the outputs. -
trainable
: IfTrue
also add variables to the graph collectionGraphKeys.TRAINABLE_VARIABLES
(see tf.Variable). -
scope
: Optional scope forvariable_scope
.
Returns:
A Tensor
representing the output of the operation.
Please login to continue.