forked from tensorflow/tfjs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
138 lines (115 loc) · 3.66 KB
/
index.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!--
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>
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/6.0.0/normalize.min.css">
<style>
body {
margin: 40px;
}
.row {
display: flex;
flex-direction: row;
width: inherit;
justify-content: space-between;
}
.col {
display: flex;
flex-direction: column;
}
.desc,
.controls {
padding: 10px;
max-width: 400px;
}
.controls input[type="radio"] {
margin-right: 2px;
}
.controls label {
margin-right: 15px;
}
#vis {
width: 100%;
min-height: 100px;
margin-left: 50px;
}
button {
margin-bottom: 20px;
font-size: 140%;
}
canvas {
border: 1px solid black;
}
</style>
</head>
<body>
<div class="row">
<div class="col">
<div class="desc">
<h1>GPU Accelerated T-SNE in the Browser</h1>
<p>
This example demonstrates using
<a href="https://github.com/tensorflow/tfjs-tsne">tfjs-tsne</a> to do dimensionality reduction on the
<a href="https://en.wikipedia.org/wiki/MNIST_database">MNIST data set</a>. Here we take 10000 images of
digits, resize them to 10x10px and use T-SNE to organize them
in two dimensions.
</p>
<p>See the
<a href="https://arxiv.org/abs/1805.10817">the paper</a> for more details, and check out the code for this
example
<a href="https://github.com/tensorflow/tfjs-examples/tree/master/tsne-mnist-canvas">here.</a>
</p>
</div>
<div class="controls">
<div>
<button id='start' disabled>Start T-SNE</button>
</div>
<div>
<label>Perplexity</label>
<br>
<span class='value-disp'>30</span>
<input id="perplexity-input" type="range" min="2" max="42" value="30" step="1"></input>
</div>
<div>
<label>KNN Iterations</label>
<br>
<span class='value-disp'>800</span>
<input id="knn-input" type="range" min="2" max="1500" value="800" step="1"></input>
</div>
<div>
<label>T-SNE Iterations</label>
<br>
<span class='value-disp'>500</span>
<input id="tsne-input" type="range" min="1" max="1000" value="500" step="1"></input>
</div>
<div>
<label>
Number of Digits (dataset size)
</label>
<br>
<input type="radio" id="small" name="numPoints" value="500">
<label for="small">500 Digits</label>
<input type="radio" id="medium" name="numPoints" value="2000">
<label for="medium">2000 Digits</label>
<input type="radio" id="large" name="numPoints" value="10000" checked>
<label for="large">10000 Digits</label>
</div>
</div>
</div>
<div id="vis"></div>
</div>
<script src="./index.js"></script>
</body>
</html>