advanced deep-learning best practices conv (pointwise convconcatenate conv conv conv depthwise convolutionindependent spatial convs per channel conv figure dept hwise separable convolut iona dept hwise convolut ion followed by pointwise convolution split channels these advantages become especially important when you're training small models from scratch on limited data for instancehere' how you can build lightweightdepthwise separable convnet for an image-classification task (softmax categorical classificationon small datasetfrom keras models import sequentialmodel from keras import layers height width channels num_classes model sequential(model add(layers separableconv ( activation='relu'input_shape=(heightwidthchannels,))model add(layers separableconv ( activation='relu')model add(layers maxpooling ( )model add(layers separableconv ( activation='relu')model add(layers separableconv ( activation='relu')model add(layers maxpooling ( )model add(layers separableconv ( activation='relu')model add(layers separableconv ( activation='relu')model add(layers globalaveragepooling ()model add(layers dense( activation='relu')model add(layers dense(num_classesactivation='softmax')model compile(optimizer='rmsprop'loss='categorical_crossentropy'when it comes to larger-scale modelsdepthwise separable convolutions are the basis of the xception architecturea high-performing convnet that comes packaged with keras you can read more about the theoretical grounding for depthwise separable licensed to