tf.contrib.layers.convolution2d(*args, **kwargs)
Adds a 2D convolution followed by an optional batch_norm layer.
convolution2d creates a variable called weights, representing the convolutional kernel, that is convolved with the inputs to produce a Tensor of activations. If a normalizer_fn is provided (such as batch_norm), it is then applied. Otherwise, if normalizer_fn is None and a biases_initializer is provided then a biases variable would be created and added the activations. Finally, if activation_fn is not None, it is applied to the activations as well.
Performs a'trous convolution with input stride equal to rate if rate is greater than one.
Args:
-
inputs: a 4-D tensor[batch_size, height, width, channels]. -
num_outputs: integer, the number of output filters. -
kernel_size: a list of length 2[kernel_height, kernel_width]of of the filters. 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: one ofVALIDorSAME. -
rate: integer. If less than or equal to 1, a standard convolution is used. If greater than 1, than the a'trous convolution is applied andstridemust be set to 1. -
activation_fn: activation function, set to None to skip it and maintain a linear activation. -
normalizer_fn: normalization function to use instead ofbiases. Ifnormalizer_fnis provided thenbiases_initializerandbiases_regularizerare ignored andbiasesare 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: IfTruealso 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.
Raises:
-
ValueError: if both 'rate' andstrideare larger than one.
Please login to continue.