Discussions>How SeparableConv works in keras?>

How SeparableConv works in keras?

I started to use the new API of Keras and would like to know how SeparableConv works, how it is designed?

3 votesLP218.00
1 Answers

Separable convolution firstly performs depthwise spatial convolution (which acts on each input channel separately), then then pointwise (1x1 filter) convolution over it, to mix all channels. Here is a visualization of it:

Take a look at the channel counts. its 3 in the moddle stage, because the input is has 3 channels. At the last stage it mixes all the channels.

Keras has an implementation of Separable1D, Separable2D etc.

keras.layers.SeparableConv2D(filters, kernel_size, strides=(1, 1), padding='valid', data_format=None, dilation_rate=(1, 1), depth_multiplier=1, activation=None, use_bias=True, depthwise_initializer='glorot_uniform', pointwise_initializer='glorot_uniform', bias_initializer='zeros', depthwise_regularizer=None, pointwise_regularizer=None, bias_regularizer=None, activity_regularizer=None, depthwise_constraint=None, pointwise_constraint=None, bias_constraint=None)
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?