The codes for the CNN are taken mainly from https://medium.com/@nutanbhogendrasharma/pytorch-convolutional-neural-network-with-mnist-dataset-4e8a4265e118 For the competition, please make sure your code adheres to PEP-8 standard as much as possible.