PeterWright commited on
Commit
5d1abe5
·
verified ·
1 Parent(s): 22afe27

modify README & add model

Browse files
Files changed (3) hide show
  1. .DS_Store +0 -0
  2. README.md +37 -0
  3. mnist_lenet.pt +3 -0
.DS_Store ADDED
Binary file (6.15 kB). View file
 
README.md CHANGED
@@ -1,3 +1,40 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+
5
+ ## Introduction
6
+
7
+ MNIST_LeNet is a CNN model used for handwriting recognization.
8
+ This model is trained with traditional MNIST dataset, which is included in PyTorch as default.
9
+
10
+ As a result, it could achieve 99.5% accuracy among handwriting recognization tasks.
11
+
12
+ ## Hands on
13
+
14
+ ```python3
15
+ import torch
16
+
17
+ LeNet = torch.load('path/to/model/mnist_lenet.pt')
18
+
19
+ LeNet.eval()
20
+
21
+ # config preprocessor for your data
22
+ transform = ...
23
+
24
+ # load data
25
+ input_data = transform(open('path/to/your/data'))
26
+
27
+ # predict with our model
28
+ with torch.no_grad():
29
+ output = LeNet(input_data)
30
+
31
+ # explain results
32
+ prob = torch.nn.functional.softmax(output[0], dim=0)
33
+ ...
34
+ ```
35
+
36
+ ## Reference
37
+
38
+ - [LeNet Paper: GradientBased Learning Applied to Document
39
+ Recognition(1998)](http://vision.stanford.edu/cs598_spring07/papers/Lecun98.pdf)
40
+
mnist_lenet.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82bddfddbfb79c2dbc95f47c265b924b63ac9dabdff48b682f27fc213a8f588f
3
+ size 183088