This repo trains a ResNet18 model on the MNIST dataset. The dataset is resized and normalized to fit the ResNet model, and training is done using PyTorch.
To set up the environment, use the following commands:
conda create --name pytorch_env python=3.11.9 --file requirements.txt
conda activate pytorch_env- Dataset is loaded using
torchvision.datasets.MNIST. - Images are resized to 224x224, normalized, and converted to tensors.
The combined training and test dataset is split into:
- Training Set: 42,000 samples
- Validation Set: 14,000 samples
- Test Set: 14,000 samples
- ResNet18 is loaded and modified for single-channel input and 10 output classes.
- Assign data to respective dataloaders.
- Loss Function: CrossEntropyLoss
- Optimizer: SDG with learning rate 0.01

