convolutional neural networks def forward(selfx)out self conv_unit_ (xout self conv_unit_ (outout self conv_unit_ (outout self conv_unit_ (out#reshape the output out out view(out size( ),- out self fc (outout self fc (outout self final(outreturn(outsimilar to the mnist examplethe fully connected layer needs the number of input dimensionswhich would be different here based on the convolutional units because we applied four convolutional units in the original samplethe size of the image would shrinkas ([original -[first -[second -[third -[fourth thereforethe fully connected layer would have input dimensionswith being the number of kernels in the preceding unit listing - defines function for evaluating our new network listing - defining the evaluation function def evaluate(model,data_loader)loss [correct with torch no_grad()for imageslabels in data_loaderimages images to(devicelabels labels to(devicemodel eval(