This project trains a neural network model using PyTorch to classify handwritten characters from the EMNIST dataset. The model consists of multiple fully connected layers with LeakyReLU activations. The repository includes code for data loading, training, evaluation, and visualization (loss curves, confusion matrix, and classification report).
The goal of this project is to build a classifier for the EMNIST dataset—a dataset of handwritten characters. The model is trained using stochastic gradient descent with cross-entropy loss and is evaluated using standard classification metrics. This repository demonstrates:
- How to download and preprocess the EMNIST dataset using torchvision.
- How to build a neural network model in PyTorch.
- Training and evaluation procedures including loss monitoring and performance metrics.
- Visualization of training/validation loss curves and the confusion matrix.
- Python: Version 3.7 or higher is recommended.
- CUDA: Optional, if you plan to run the model on a GPU.
The project requires the following Python packages:
torchtorchvisionmatplotlibseabornscikit-learnpandas
You can install these dependencies by running:
pip install -r requirements.txt