This project implements a Convolutional Neural Network (CNN) in PyTorch for image classification. The model is designed to work with grayscale images of size 28x28 and can classify them into predefined classes (default is 10).
- Architecture: The CNN consists of a feature extractor with convolutional layers and a classifier with a linear layer.
- Training: Use the
train_model
function with an optimizer, the CNN model, and the desired number of epochs. - Evaluation: Assess the model's performance on a test dataset using provided code snippets for metrics like accuracy, precision, and recall.