-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
87 lines (60 loc) · 2.05 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
<html>
<head>
<title>Linear regression using Tensorflow.js</title>
<meta charset=UTF-8>
<meta name=viewport content="width=device-width, initial-scale=1">
<link rel=stylesheet href=https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css integrity=sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T crossorigin=anonymous>
<style>
.chartWithOverlay {
position: relative;
}
.overlay {
position: absolute;
top: 95px;
/* chartArea top */
left: 95px;
/* chartArea left */
}
section {
margin: 20px;
}
</style>
</head>
<body>
<div class=container>
<section>
<h1>A simple linear regression example</h1>
</section>
<section>
<h4>Description</h4>
<p>
This examples demonstrates training of a simple regression model, using the tensorflow.js Core API. Under visualisation you can see the correct and the guessed graph. Also some datapoints the network is trained on. At the right you can see the loss function.
</p>
<p>The function we want to approximate is y = m * x + b</p>
</section>
<section>
<h4>Status</h4>
<div id=status>Loading data...</div>
<div id=message></div>
</section>
<section>
<h4>Visualisation</h4>
<div class=row>
<div class=col-sm-6>
<div class=chartWithOverlay>
<div id=chart_div></div>
<canvas class=overlay width=309 height=309 id=overlay />
</div>
</div>
<div class=col-sm-6 id=gradient_div>
</div>
</div>
</section>
<section>
<h4>Test Examples</h4>
<div class=row id=predictions></div>
</section>
</div>
<script src=index.js></script>
</body>
</html>