convolutional neural networks by half (as we want it to bethereforethe resultant imagewhich was originally will be transformed into tensor of size (where is the number of filters we definedwith each additional convolutional unitwe will see the number being shrunk by half (as result of the max pooling operationthusafter three consecutive convolutional unitsthe final size would be ( - - the fully connected layerfc has input nodes as (where is the number of kernels in the preceding convolutional unitthe forward function connects these convolutional units sequentially with the fully connected layers the last layer will have output nodes as we have multi-class classification problem herei classifying digit as the softmax function in the last layer tailors the output into neat set of probability scores for our multi-class use case in listing - we define the structure of our cnn and the helper functions to evaluate the model' performance and generate predictions listing - defining the cnn and the helper functions #define conv-net class convnet(nn module)def __init__(selfnum_classes= )super(convnetself__init__(#first unit of convolution self conv_unit_ nn sequentialnn conv ( kernel_size= stride= padding= )nn batchnorm ( )nn relu()nn maxpool (kernel_size= stride= )#second unit of convolution self conv_unit_ nn sequentialnn conv ( kernel_size= stride= padding= )