deep learning for computer vision introduction to convnets we're about to dive into the theory of what convnets are and why they have been so successful at computer vision tasks but firstlet' take practical look at simple convnet example it uses convnet to classify mnist digitsa task we performed in using densely connected network (our test accuracy then was %even though the convnet will be basicits accuracy will blow out of the water that of the densely connected model from the following lines of code show you what basic convnet looks like it' stack of conv and maxpooling layers you'll see in minute exactly what they do listing inst ant iat ing small convnet from keras import layers from keras import models model models sequential(model add(layers conv ( ( )activation='relu'input_shape=( ))model add(layers maxpooling (( ))model add(layers conv ( ( )activation='relu')model add(layers maxpooling (( ))model add(layers conv ( ( )activation='relu')importantlya convnet takes as input tensors of shape (image_heightimage_widthimage_channels(not including the batch dimensionin this casewe'll configure the convnet to process inputs of size ( )which is the format of mnist images we'll do this by passing the argument input_shape=( to the first layer let' display the architecture of the convnet so farmodel summary(layer (typeoutput shape param ===============================================================conv d_ (conv (none maxpooling d_ (maxpooling (none conv d_ (conv (none maxpooling d_ (maxpooling (none conv d_ (conv (none ===============================================================total params , trainable params , non-trainable params you can see that the output of every conv and maxpooling layer is tensor of shape (heightwidthchannelsthe width and height dimensions tend to shrink licensed to