tf.contrib.layers.separable_convolution2d(*args, **kwargs)
Adds a depth-separable 2D convolution with optional batch_norm layer.
This op first performs a depthwise convolution that acts separately on channels, creating a variable called depthwise_weights
. If num_outputs
is not None, it adds a pointwise convolution that mixes channels, creating a variable called pointwise_weights
. Then, if batch_norm_params
is None, it adds bias to the result, creating a variable called 'biases', otherwise it adds a batch normalization layer. It finally applies an activation function to produce the end result.
Args:
-
inputs
: a tensor of size [batch_size, height, width, channels]. -
num_outputs
: the number of pointwise convolution output filters. If is None, then we skip the pointwise convolution stage. -
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. -
depth_multiplier
: the number of depthwise convolution output channels for each input channel. The total number of depthwise convolution output channels will be equal tonum_filters_in * depth_multiplier
. -
stride
: a list of length 2: [stride_height, stride_width], specifying the depthwise convolution stride. Can be an int if both strides are the same. -
padding
: one of 'VALID' or 'SAME'. -
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
: whether or not the variables should be trainable or not. -
scope
: Optional scope for variable_scope.
Returns:
A Tensor
representing the output of the operation.
Please login to continue.