https://github.com/kevinwood15/python_ml_neuralnetwork_project
I build a neural network to evaluate the CIFAR-10 dataset and achieve above 50% accuracy
https://github.com/kevinwood15/python_ml_neuralnetwork_project
cifar10 data-science data-visualization deep-learning neural-network python pytorch
Last synced: about 2 months ago
JSON representation
I build a neural network to evaluate the CIFAR-10 dataset and achieve above 50% accuracy
- Host: GitHub
- URL: https://github.com/kevinwood15/python_ml_neuralnetwork_project
- Owner: kevinwood15
- Created: 2025-03-07T19:46:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-07T19:53:41.000Z (over 1 year ago)
- Last Synced: 2025-03-07T20:32:56.113Z (over 1 year ago)
- Topics: cifar10, data-science, data-visualization, deep-learning, neural-network, python, pytorch
- Language: Jupyter Notebook
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python_NeuralNetwork_Project
In this project, I use PyTorch to build a neural network and evaluate the CIFAR-10 dataset.
I load the data, flatten the images, and specify a Cross Entropy loss function and Stochastic Gradient Descent optimizer.
I train the data on a GPU accessible through Udacity, since this modeling is computationally intensive. I run 30 epochs until the test accuracy converges to around 50% (achieved at about epoch 22).
The testing loss and validation loss began to diverge around 15 to 30 epochs with an accuracy of 45%, so the model overfits to some extent.
Overall, The model is a simple application of deep learning to image classification. I simply converted my images to tensors rather than specifying a more complication transformation with normalization, etc.
Pursuing these more compliated transformation could improve accuracy.
My model has 5 layers, starting with an input of 3072 (3x32x32 from the tensor dimensions) and reducing down to the 10 outputs, one for each class of image.
Each layer utilizes a rectified linear unit function. I specified a cross entropy loss function and utilized stochastic gradient descent with a learning rate of 0.1.
The model could be improved with a more granular learning rate (for example 0.01, 0.001, ...), but this would involve more computational power.