Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,56 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
|
5 |
+
### **MNIST CNN Classifier**
|
6 |
+
- Adapted from Pytorch Examples
|
7 |
+
|
8 |
+
#### **Model Overview**
|
9 |
+
- **Model Name**: MNIST CNN Classifier
|
10 |
+
- **Model Type**: Convolutional Neural Network (CNN)
|
11 |
+
- **Dataset**: MNIST (Modified National Institute of Standards and Technology)
|
12 |
+
- A dataset of 70,000 handwritten digits (28x28 grayscale images) of digits 0-9.
|
13 |
+
- **Task**: Image classification (Digit recognition)
|
14 |
+
- **Framework**: PyTorch
|
15 |
+
- **Preprocessing**:
|
16 |
+
- Images are normalized and transformed before feeding into the model (e.g., scaling pixel values to a [0, 1] range).
|
17 |
+
|
18 |
+
#### **Model Architecture**
|
19 |
+
- **Input Layer**: 28x28 grayscale images.
|
20 |
+
- **Convolutional Layers**:
|
21 |
+
- Conv1: 32 filters of size 3x3, applied to the input image (1 channel).
|
22 |
+
- Conv2: 64 filters of size 3x3, applied to the output of Conv1.
|
23 |
+
- **Activation Functions**:
|
24 |
+
- ReLU activations after each convolutional layer.
|
25 |
+
- **Pooling Layer**:
|
26 |
+
- Max pooling with a 2x2 window after Conv2.
|
27 |
+
- **Dropout**:
|
28 |
+
- Dropout rate of 25% after the first convolutional layer and 50% after the fully connected layer to prevent overfitting.
|
29 |
+
- **Fully Connected Layers**:
|
30 |
+
- fc1: A fully connected layer with 128 neurons.
|
31 |
+
- fc2: A fully connected layer with 10 output units (one for each digit).
|
32 |
+
- **Output**:
|
33 |
+
- Log-softmax activation applied to the final layer to produce log-probabilities for the 10 classes.
|
34 |
+
|
35 |
+
#### **Training Details**
|
36 |
+
|
37 |
+
- **Batch Size**: (60000)
|
38 |
+
- **Epochs**: (14)
|
39 |
+
- **Learning Rate**: (1.0 Adadelta)
|
40 |
+
- **Hardware Used**: (Google Colab T4 GPU)
|
41 |
+
|
42 |
+
#### **Performance Metrics**
|
43 |
+
- **Training Accuracy**: (99%)
|
44 |
+
- **Training Loss**: (0.0273)
|
45 |
+
|
46 |
+
#### **Usage Instructions**
|
47 |
+
- **How to Use**:
|
48 |
+
- Clone the repo
|
49 |
+
- **Dependencies**:
|
50 |
+
- pip install transformers torch torchvision==0.20.0
|
51 |
+
- ``` python app.py ```
|
52 |
+
|
53 |
+
#### **Model Limitations**
|
54 |
+
- This model may struggle with noise or distorted images and is trained on relatively clean data.
|
55 |
+
- The model is limited to the MNIST digit set and may not perform well on other datasets or noisy, out-of-distribution data.
|
56 |
+
|