of all possible input matrix regions and the kernel matrix(see example in particularby noting that there are ( ( possible regions in the original imagewe conclude that the convolution layer output size is ( ( in practicewe frequently define several kernel matricesgiving an output layer of size ( ( (the number of kernelsfigure shows input image and kernel with output matrix an example of using cnn for image classification is given in section figure an example input image and kernel the kernel is applied to every region of the original image deep learning back-propagation the training of neural networks is major challenge that requires both ingenuity and much experimentation the algorithms for training neural networks with great depth are collectively referred to as deep learning methods one of the simplest and most effective methods for training is via steepest descent and its variations steepest descent requires computation of the gradient with respect to all bias vectors and weight matrices given the potentially large number of parameters (weight and bias termsin neural networkwe need to find an efficient method to calculate this gradient to illustrate the nature of the gradient computationslet th {wl bl be column vecpl tor of length dim(thl= (pl- pl pl that collects all the weight parameters (numberpl pl ing = pl- pl and bias parameters (numbering = pl of multiple-layer network with training lossn loss(yi (xi th)` ( (th): = writing ci (th:loss(yi (xi th)for short (using for cost)we have ` ( (th)ci (th) = ( so that obtaining the gradient of ` requires computation of ci /th for every for activation functions of the form ( )define dl as the diagonal matrix with the vector of derivatives ( :[ (zl, ) (zl,pl )]down its main diagonalthat isdl :diag( (zl, ) (zl,pl ))