File size: 668 Bytes
e8adde1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
license: apache-2.0
pipeline_tag: image-classification
tags:
- pretrained
---

# Model Card for MNIST-MLP

This is a simple MLP trained on the MNIST dataset.

Its primary use is to be a very simple reference model to test quantization.

## Inputs preprocessing

The MNIST images must be normalized and flattened as follows:

```
from torchvision import datasets, transforms


transform=transforms.Compose([
        transforms.ToTensor(),
        transforms.Normalize((0.1307,), (0.3081,)),
        transforms.Lambda(lambda x: torch.flatten(x)),
])
test_set = datasets.MNIST('../data', train=False, download=True,
                          transform=transform)
```