convnets convolution layers look at spatially local patterns by applying the same geometric transformation to different spatial locations (patchesin an input tensor this results in representations that are translation invariantmaking convolution layers highly data efficient and modular this idea is applicable to spaces of any dimensionality (sequences) (images) (volumes)and so on you can use the conv layer to process sequences (especially text--it doesn' work as well on timeserieswhich often don' follow the translation-invariance assumption)the conv layer to process imagesand the conv layers to process volumes convnetsor convolutional networksconsist of stacks of convolution and max-pooling layers the pooling layers let you spatially downsample the datawhich is required to keep feature maps to reasonable size as the number of features growsand to allow subsequent convolution layers to "seea greater spatial extent of the inputs convnets are often ended with either flatten operation or global pooling layerturning spatial feature maps into vectorsfollowed by dense layers to achieve classification or regression note that it' highly likely that regular convolutions will soon be mostly (or completelyreplaced by an equivalent but faster and representationally efficient alternativethe depthwise separable convolution (separableconv layerthis is true for dand inputs when you're building new network from scratchusing depthwise separable convolutions is definitely the way to go the separableconv layer can be used as drop-in replacement for conv dresulting in smallerfaster network that also performs better on its task here' typical image-classification network (categorical classificationin this case)model models 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'rnns recurrent neural networks (rnnswork by processing sequences of inputs one timestep at time and maintaining state throughout ( state is typically vector or set of vectorslicensed to