File size: 1,251 Bytes
ef0ee1c
 
 
 
 
 
 
 
 
 
 
 
00bbe3c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: Ae Gen
emoji: 💻
colorFrom: yellow
colorTo: pink
sdk: gradio
sdk_version: 3.16.2
app_file: app.py
pinned: false
license: mit
---

- ConvAE model (from [`Digits that are not: Generating new types through deep neural nets`](https://arxiv.org/pdf/1606.04345.pdf))
- DeepConvAE model (from [here](https://tel.archives-ouvertes.fr/tel-01838272/file/75406_CHERTI_2018_diffusion.pdf), Section 10.1 with `L=3`)
- Dense K-Sparse model (from [`Out-of-class novelty generation`](https://openreview.net/forum?id=r1QXQkSYg))

These models were trained on MNIST only (digits), but were found to generate new kinds of symbols, see the references for more details.

![](image.png)

# Install requirements

`pip install -r requirements.txt`

# Download models

```bash
git lfs pull
```

# Training

`python cli.py train  --dataset=mnist --folder=convae --model=convae`

`python cli.py train  --dataset=mnist --folder=deep_convae --model=deep_convae`

# Generate samples

```bash
python cli.py test --model-path=convae.th --nb-generate=100 --folder=convae
```

```bash
python cli.py test --model-path=deep_convae.th --nb-generate=100 --folder=deep_convae
```

```bash
python cli.py test --model-path=fc_sparse.th --nb-generate=100 --folder=deep_convae
```