![](https://media5.datahacker.rs/2018/11/sl_1.png)
Why does padding hold an important role when building a convolutional neural network Examples on how to perform padding on cnn
Padding In order to build deep neural networks, one modification to the basic convolutional operation that we have to use is padding. Let's see how it works. What we saw in earlier posts is that if we take a $latex 6 \times 6 $ image and convolve it with
![](https://editor.analyticsvidhya.com/uploads/9217311042_2019_8345_Fig4_HTML.png)
Basics of CNN in Deep Learning - Analytics Vidhya
![](https://miro.medium.com/v2/resize:fit:678/1*YIlN1Bp_2xqlLhqhl9oR7w.jpeg)
Padding in Neural Networks: Why and How?, by Ashish Sanjay Raut
![](https://miro.medium.com/v2/resize:fit:1400/1*kkyW7BR5FZJq4_oBTx3OPQ.png)
Convolutional Neural Networks, Explained, by Mayank Mishra
![](https://almablog-media.s3.ap-south-1.amazonaws.com/4_bec7767649.png)
What is “padding” in Convolutional Neural Network?
![](http://xrds.acm.org/blog/wp-content/uploads/2016/06/Figure_6.png)
Convolutional Neural Networks (CNNs): An Illustrated Explanation - XRDSXRDS
![](https://pyimagesearch.com/wp-content/uploads/2019/02/keras_multi_input_header.png)
Keras: Multiple Inputs and Mixed Data - PyImageSearch
![](https://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/Comparison_image_neural_networks.svg/1200px-Comparison_image_neural_networks.svg.png)
AlexNet - Wikipedia
![](https://media.geeksforgeeks.org/wp-content/uploads/20230215093338/Valid-Padding-1.png)
What is the difference between 'SAME' and 'VALID' padding in tf.nn.max_pool of tensorflow? - GeeksforGeeks
![](https://www.simplilearn.com/ice9/free_resources_article_thumb/CIFAR9.png)
Convolutional Neural Network Tutorial [Update]
![](https://media.geeksforgeeks.org/wp-content/uploads/20220302180104/Group16.jpg)
What is Padding in Neural Network? - GeeksforGeeks
![](https://media.geeksforgeeks.org/wp-content/uploads/20230215093923/CNN-Architectures-1.png)
Convolutional Neural Network (CNN) Architectures - GeeksforGeeks
![](https://www.frontiersin.org/files/Articles/815163/fnhum-16-815163-HTML/image_m/fnhum-16-815163-g001.jpg)
Frontiers A Zero-Padding Frequency Domain Convolutional Neural Network for SSVEP Classification
![](https://images.deepai.org/glossary-terms/5361a0e82d3941e58903b90f64e71491/download.png)
Padding (Machine Learning) Definition
![](https://miro.medium.com/v2/resize:fit:1400/1*ciDgQEjViWLnCbmX-EeSrA.gif)
Understanding ConvNets (CNN). Image recognition is a classic…, by Gisely Alves, Neuronio