forked from tensorflow/tfjs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.html
107 lines (90 loc) · 2.94 KB
/
client.html
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!--
Copyright 2018 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================
-->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../shared/tfjs-examples.css" />
<style>
.plot-area {
display: flex;
flex-direction: column;
}
.row {
display: flex;
flex-direction: row;
}
.col {
display: flex;
flex-direction: column;
}
input {
max-width: 80px;
}
</style>
</head>
<body>
<div class='tfjs-example-container centered-container'>
<section class='title-area'>
<h1>TensorFlow.js: Variational AutoEncoder (VAE)</h1>
<p class='subtitle'>Train a VAE model to generate images.</p>
</section>
<section>
<p class='section-head'>Description</p>
<p>
This example trains a
<a href="https://blog.keras.io/building-autoencoders-in-keras.html">
variational autoencoder</a>
to generate images that resemble those found in the <a href="https://github.com/zalandoresearch/fashion-mnist">
fashion MNIST</a> dataset.
</p>
<p>
This example trains the model in Node.js. See README.md for instructions. This page
contains a viewer for the trained model.
</p>
<p>
This examples assumes that the latest space of the autoencoder is 2d.
</p>
</section>
<div>
<section>
<p class='section-head'>Instructions</p>
<p>
You can adjust the number of images in the grid as well as the start and end
values used to generate each image. Experiment with them see the range of what
the autoencoder can generate.
</p>
</section>
<section>
<p class='section-head'>Controls</p>
<div>
<label for="">Points per dimension</label>
<input id="pointsPerDim" type="number" value=30>
<label for="">Start Val</label>
<input id="start" type="number" value=-4>
<label for="">end Val</label>
<input id="end" type="number" value=4>
<button id="update">Update</button>
</div>
</section>
<section>
<p class='section-head'>Results</p>
<div id="plot-area" class="plot-area">
</div>
</section>
</div>
</div>
<script src="client.js"></script>
</body>
</html>