update text
Browse files
app.py
CHANGED
@@ -23,18 +23,22 @@ def gen(md, model_name, seed, nb_iter, nb_samples, width, height, nb_active, onl
|
|
23 |
w=int(width), h=int(height), c=1,
|
24 |
batch_size=bs,
|
25 |
)
|
|
|
|
|
26 |
if only_last:
|
27 |
s = int(math.sqrt((nb_samples)))
|
28 |
grid = grid_of_images_default(samples[-1].numpy(), shape=(s, s))
|
29 |
else:
|
30 |
grid = grid_of_images_default(samples.reshape((samples.shape[0]*samples.shape[1], int(height), int(width), 1)).numpy(), shape=(samples.shape[0], samples.shape[1]))
|
31 |
-
if not black_bg:
|
32 |
-
grid = 1 - grid
|
33 |
grid = (grid*255).astype("uint8")
|
34 |
return Image.fromarray(grid)
|
35 |
|
36 |
text = """
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
|
39 |
These models were trained on MNIST only (digits), but were found to generate new kinds of symbols, see the references for more details.
|
40 |
|
|
|
23 |
w=int(width), h=int(height), c=1,
|
24 |
batch_size=bs,
|
25 |
)
|
26 |
+
if not black_bg:
|
27 |
+
samples = 1 - samples
|
28 |
if only_last:
|
29 |
s = int(math.sqrt((nb_samples)))
|
30 |
grid = grid_of_images_default(samples[-1].numpy(), shape=(s, s))
|
31 |
else:
|
32 |
grid = grid_of_images_default(samples.reshape((samples.shape[0]*samples.shape[1], int(height), int(width), 1)).numpy(), shape=(samples.shape[0], samples.shape[1]))
|
|
|
|
|
33 |
grid = (grid*255).astype("uint8")
|
34 |
return Image.fromarray(grid)
|
35 |
|
36 |
text = """
|
37 |
+
This interface supports generation of samples from:
|
38 |
+
|
39 |
+
- ConvAE model (from [`Digits that are not: Generating new types through deep neural nets`](https://arxiv.org/pdf/1606.04345.pdf))
|
40 |
+
- DeepConvAE model (from [here](https://tel.archives-ouvertes.fr/tel-01838272/file/75406_CHERTI_2018_diffusion.pdf), Section 10.1 with `L=3`)
|
41 |
+
- Dense K-Sparse model (from [`Out-of-class novelty generation`](https://openreview.net/forum?id=r1QXQkSYg))
|
42 |
|
43 |
These models were trained on MNIST only (digits), but were found to generate new kinds of symbols, see the references for more details.
|
44 |
|