Zolisa commited on
Commit
fc17765
·
verified ·
1 Parent(s): 0b57a4b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +47 -0
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ library_name: pytorch
5
+ tags:
6
+ - mnist
7
+ - image-classification
8
+ - neural-network
9
+ datasets:
10
+ - mnist
11
+ metrics:
12
+ - accuracy
13
+ ---
14
+
15
+ # Simple PyTorch Neural Network for MNIST
16
+
17
+ This model is a basic feed-forward neural network trained on the MNIST dataset as part of a PyTorch tutorial.
18
+
19
+ ## Model Architecture
20
+ The model consists of:
21
+ 1. **Input Layer**: 784 neurons (28x28 flattened images).
22
+ 2. **Hidden Layer**: 128 neurons with ReLU activation.
23
+ 3. **Output Layer**: 10 neurons (one for each digit from 0-9).
24
+
25
+ ## Training Details
26
+ - **Dataset**: MNIST (60,000 training images, 10,000 test images)
27
+ - **Epochs**: 5 (by default)
28
+ - **Optimizer**: Adam (lr=0.001)
29
+ - **Loss Function**: CrossEntropyLoss
30
+
31
+ ## Usage
32
+ To load this model in your PyTorch project:
33
+
34
+ ```python
35
+ import torch
36
+ from simple_nn import SimpleNN
37
+
38
+ # 1. Initialize the model architecture
39
+ model = SimpleNN()
40
+
41
+ # 2. Load the state dictionary
42
+ model.load_state_dict(torch.load("model.pth"))
43
+ model.eval()
44
+ ```
45
+
46
+ ## Dataset Information
47
+ The MNIST dataset consists of 28x28 grayscale images of the 10 digits. It is a classic dataset for image classification tasks.