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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
|
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="dep/material-icons.css">
<link rel="stylesheet" href="dep/material.deep_purple-blue.min.css">
<link rel="stylesheet" href="dep/emojione.min.css">
</head>
<body>
<script src="dep/d3.js" type="text/javascript"></script>
<script src="dep/material.min.js" type="text/javascript"></script>
<script src="dep/emojione.min.js" type="text/javascript"></script>
<script src="dep/impress.js" type="text/javascript"></script>
<script src="code/weightvis.js" type="text/javascript"></script>
<script src="code/weightviswrapper.js" type="text/javascript"></script>
<script src="code/errorvis.js" type="text/javascript"></script>
<script src="code/bostonset.js" type="text/javascript"></script>
<!-- TODO Lizenzen Emoji One, Wikimedia-Bilder -->
<script type="text/javascript">
var weightsWrapper = new WeightVisWrapper();
var errorVis = new ErrorVis();
var bostonset = new Bostonset();
document.addEventListener("DOMContentLoaded", function() {
impress().init();
emojione.imageType = 'svg';
emojione.sprites = true;
emojione.imagePathSVGSprites = 'dep/emojione.sprites.svg';
/* emoji */
d3.selectAll(".emoji").each(function() {
var me = d3.select(this);
me.html(emojione.toImage(me.html()));
});
d3.selectAll(".visContainer")[0].forEach(function(el) {
weightsWrapper.addPlaceholder(el.parentNode);
});
weightsWrapper.load("data/weights.json", function() {
weightsWrapper.reposition();
});
d3.selectAll(".errorContainer")[0].forEach(function(el) {
errorVis.addPlaceholder(el.parentNode);
});
errorVis.load("data/error.json", function() {});
bostonset.load("data/boston.csv");
sizeSlides();
}, false);
/* responsive deck */
function sizeSlides() {
d3.selectAll(".slide")
.style("width", parseInt(window.innerWidth) * 0.9 + "px")
.style("height", parseInt(window.innerHeight) * 0.9 + "px");
};
window.addEventListener("resize", sizeSlides);
document.addEventListener("impress:innerstep", function(e) {
d3.selectAll(".lastInnerstep")[0].forEach(function(ist) { ist.classList.remove("lastInnerstep"); });
var stepped = d3.select(e.target).selectAll(".stepped")[0];
stepped[stepped.length-1].classList.add("lastInnerstep");
});
</script>
<div id="impress">
<!-- TODO Fortschrittsbalken unten? -->
<div class="mdl-layout mdl-js-layout step slide" data-x="0" data-y="0" data-z="5000">
<h1 class="mdl-layout__header">Künstliche neuronale Netze</h1>
<!-- TODO center oder Bild -->
<h2>38 Gewichte in 20 Minuten</h2>
</div>
<!-- TODO Inhaltsübersicht -->
<div class="mdl-layout mdl-js-layout step slide" data-x="2000" data-y="0" data-z="5000">
<h1 class="mdl-layout__header">Von der Eingabe zur Ausgabe</h1>
<div class="innerStep stepped lastInnerstep emoji center" style="font-size: 3000%;">
<h2>Das ist Kitty.</h2>
:smiley_cat:
</div>
<div class="innerStep emoji center" style="font-size: 3000%;">
<h2>Kitty ist blöd.</h2>
:pouting_cat:
</div>
<div class="innerStep emoji center" style="font-size: 1500%;">
<h2>Wenn Kitty Steves Hut sieht, schnurrt sie manchmal.</h2>
:man: :tophat: :heart_eyes_cat:
</div>
<div class="innerStep emoji center" style="font-size: 2000%;">
<h2>Steve mag es, wenn Kitty schnurrt.</h2>
:yum:
</div>
<div class="innerStep emoji center" style="font-size: 1250%;">
<h2>Steve trainiert Kitty.</h2>
<h3>Mit Keksen. (Kitty mag Kekse.)</h3>
:man: :tophat: :cookie: :smile_cat:
</div>
<div class="innerStep center emoji" style="font-size: 3000%;">
<h2>Was passiert da?</h2>
<h3>Sehen wir uns Kitty einmal genauer an.</h3>
:smiley_cat:
</div>
</div>
<div class="mdl-layout mdl-js-layout step slide" data-x="2000" data-y="2000" data-z="2500">
<h1 class="mdl-layout__header">Die Informationsverarbeitung im Gehirn</h1>
<!-- TODO margins -->
<div class="emoji center" style="font-size: 750%;">
<p style="font-size: inherit;">Eingabe (:tophat:)</p>
<p style="font-style: italic; font-size: 50%;">Rezeptor</p>
<br />
<p style="font-size: inherit;">↓</p>
<br />
<p style="font-size: inherit;">Gehirn (:sparkles:)</p>
<p style="font-style: italic; font-size: 50%;">neuronales Netz</p>
<br />
<p style="font-size: inherit;">↓</p>
<br />
<p style="font-size: inherit;">Ausgabe (:heart_eyes_cat:)</p>
<p style="font-style: italic; font-size: 50%;">Effektor</p>
</div>
</div>
<div class="mdl-layout mdl-js-layout step slide" data-x="2000" data-y="4000" data-z="2500">
<h1 class="mdl-layout__header">Neuronale Netze</h1>
<div class="innerStep stepped lastInnerstep center">
<h2>Ein Neuron</h2>
<!-- TODO Beim ersten slide-in tauchen die Bilder nicht auf! -->
<img style="height: 80%; width: 80%;" src="img/neuron.svg" alt="Schema Neuron" />
</div>
<div class="innerStep center">
<h2>Ein Neuronales Netz</h2>
<img style="height: 60%; width: 60%;" src="img/neuronales-netz.jpg" alt="Foto Neuron" />
</div>
</div>
<div class="mdl-layout mdl-js-layout step slide" data-x="4000" data-y="0" data-z="2500">
<h1 class="mdl-layout__header">Künstliche neuronale Netze</h1>
<div class="innerStep stepped lastInnerstep center">
<h2>Neuron - künstliches Neuron</h2>
<img style="height: 40%; width: 40%;" src="img/neuron.svg" alt="Schema Neuron" />
<img style="height: 40%; width: 40%;" src="img/kuenstliches_neuron.svg" alt="Schema eines künstlichen Neurons" />
</div>
<div class="innerStep center">
<h2>Neuronales Netz - künstliches neuronales Netz</h2>
<img style="height: 40%; width: 40%;" src="img/neuronales-netz.jpg" alt="Foto Neuron" />
<img style="height: 50%; width: 50%;" src="img/kuenstliches_neuronales_netz.png" alt="Mehrschichtiges Perzeptron" />
</div>
</div>
<!--
<div class="mdl-layout mdl-js-layout step slide" data-x="-1000" data-y="0" data-z="1000">
<h1 class="mdl-layout__header">Biologie</h1>
<div class="innerStep stepped lastInnerstep center">
<h3>Der Mensch und die Maschine.</h3>
<p style="font-size: 2500%">
<i style="font-size: 100%;" class="material-icons">accessibility</i>
🖥
</p>
</div>
<div class="innerStep center">
<h3>Wahrnehmung</h3>
<p>
<i style="font-size: 800%;" class="material-icons">remove_red_eye</i>
</p>
<p>
<span style="font-size: 500%;">Rezeptor</span>
</p>
</div>
<div class="innerStep center">
<h3>Reaktion.</h3>
<p>
<i style="font-size: 2500%;" class="material-icons">directions_walk</i>
</p>
<p>
<span style="font-size: 500%;">Effektor</span>
</p>
</div>
</div>
<div class="mdl-layout mdl-js-layout step slide" data-x="0" data-y="0" data-z="1000">
<h1 class="mdl-layout__header">Abstraktion eines Individuums</h1>
<p class="innerStep stepped lastInnerstep center" style="font-size: 500%;">
Wahrnehmung ➞
<i style="font-size: 100%;" class="material-icons">help_outline</i>
➞ Reaktion
</p>
<p class="innerStep center" style="font-size: 500%;">
Eingabe ➞ ✨ ➞ Ausgabe
</p>
</div>
<div class="mdl-layout mdl-js-layout step slide" data-x="1000" data-y="0" data-z="1000">
<h1 class="mdl-layout__header">Abstraktion der Ein- und Ausgabe</h1>
</div>
<div class="step slide mdl-layout mdl-js-layout" data-x="9500" data-y="0" data-z="1000">
<div class="mdl-layout__header">
<h2>Ein leeres Netz</h2>
</div>
<div class="visContainer"></div>
<script type="text/javascript">
var mocker = new WeightVisWrapper();
new VisIntegrater(function(c) {
mocker.mock([3, 2, 1], function() {
mocker.openIn(c, false);
});
}, function(c) {
mocker.remove(c);
}, ".visContainer");
</script>
</div>
<div class="step slide mdl-layout mdl-js-layout" data-x="3000" data-y="0" data-z="1000">
<div class="mdl-layout__header">
<h2>Aktivierungstest</h2>
</div>
<div class="visContainer"></div>
<p style="text-align: center; margin-top: 1.5em;">Berechneter MEDV-Wert: <span id="bsCalculated">lade…</span> - Erwarteter MEDV-Wert: <span id="bsExpected">lade…</span></p>
<script type="text/javascript">
new VisIntegrater(function(c) {
weightsWrapper.afterLoad(function() {
weightsWrapper.jumpTo(weightsWrapper.steps()-1);
weightsWrapper.openIn(c, false);
var testRows = [400, 175, 454, 481, 476, 364, 377, 75, 103, 84, 458, 483]; // from original test data
var row = 0,
inputs =[];
var calculated, expected;
do {
row = Math.floor(Math.random()*bostonset.length());
inputs = bostonset.inputs(row);
calculated = bostonset.asOutput(weightsWrapper.calculate(inputs)[0]);
expected = bostonset.expectedOutput(row);
} while(Math.abs(calculated - expected) > 5);
d3.select("#bsCalculated").text(calculated.toString());
d3.select("#bsExpected").text(expected.toString());
weightsWrapper.activate(inputs);
});
}, function(c) {
weightsWrapper.remove(c);
}, ".visContainer");
</script>
</div>
<div class="step slide mdl-layout mdl-js-layout" data-x="2000" data-y="0" data-z="1000">
<div class="mdl-layout__header">
<h2>Der Fehler im Verlauf</h2>
</div>
<div class="errorContainer"></div>
<script type="text/javascript">
new VisIntegrater(function(c) {
errorVis.afterLoad(function() {
errorVis.openIn(c, true);
errorVis.showMarker(203);
});
}, function(c) {
errorVis.remove(c);
}, ".errorContainer");
</script>
</div>
<div class="step slide mdl-layout mdl-js-layout" data-x="0" data-y="1000">
<div class="mdl-layout__header">
<h2>Die Gewichte im Verlauf</h2>
</div>
<div class="visContainer"></div>
<script type="text/javascript">
new VisIntegrater(function(c) {
weightsWrapper.afterLoad(function() {
weightsWrapper.openIn(c, true);
weightsWrapper.animate(10, 10);
});
}, function(c) {
weightsWrapper.remove(c);
}, ".visContainer");
</script>
</div>
<div class="step slide mdl-layout mdl-js-layout" data-x="2000" data-y="1000">
<div class="mdl-layout__header">
<h2>Gewichte und Fehler</h2>
</div>
<div class="visContainer"></div>
<script type="text/javascript">
new VisIntegrater(function(c) {
weightsWrapper.afterLoad(function() {
weightsWrapper.openIn(c, true);
weightsWrapper.animate(10, 10);
});
}, function(c) {
weightsWrapper.remove(c);
}, ".visContainer");
</script>
</div>
-->
</div>
</body>
</html>
|