forked from carpentries-incubator/deep-learning-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaio.html
6364 lines (6259 loc) · 375 KB
/
aio.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
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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!-- START: inst/pkgdown/templates/layout.html --><!-- Generated by pkgdown: do not edit by hand --><html lang="en" data-bs-theme="auto">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>Introduction to deep learning: All in One View</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="assets/themetoggle.js"></script><link rel="stylesheet" type="text/css" href="assets/styles.css">
<script src="assets/scripts.js" type="text/javascript"></script><!-- mathjax --><script type="text/x-mathjax-config">
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML", "output/PreviewHTML"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js", "fast-preview.js", "AssistiveMML.js", "a11y/accessibility-menu.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
},
tex2jax: {
inlineMath: [['\\(', '\\)']],
displayMath: [ ['$$','$$'], ['\\[', '\\]'] ],
processEscapes: true
}
});
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><!-- Responsive Favicon for The Carpentries --><link rel="apple-touch-icon" sizes="180x180" href="favicons/incubator/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicons/incubator/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicons/incubator/favicon-16x16.png">
<link rel="manifest" href="favicons/incubator/site.webmanifest">
<link rel="mask-icon" href="favicons/incubator/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="white">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="black">
</head>
<body>
<header id="top" class="navbar navbar-expand-md top-nav incubator"><svg xmlns="http://www.w3.org/2000/svg" class="d-none"><symbol id="check2" viewbox="0 0 16 16"><path d="M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"></path></symbol><symbol id="circle-half" viewbox="0 0 16 16"><path d="M8 15A7 7 0 1 0 8 1v14zm0 1A8 8 0 1 1 8 0a8 8 0 0 1 0 16z"></path></symbol><symbol id="moon-stars-fill" viewbox="0 0 16 16"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"></path><path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z"></path></symbol><symbol id="sun-fill" viewbox="0 0 16 16"><path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"></path></symbol></svg><a class="visually-hidden-focusable skip-link" href="#main-content">Skip to main content</a>
<div class="container-fluid top-nav-container">
<div class="col-md-8">
<div class="large-logo">
<img id="incubator-logo" alt="Carpentries Incubator" src="assets/images/incubator-logo.svg">
</div>
</div>
<div class="selector-container">
<div id="theme-selector">
<li class="nav-item dropdown" id="theme-button-list">
<button class="btn btn-link nav-link px-0 px-lg-2 dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static" aria-label="Toggle theme (auto)">
<svg class="bi my-1 theme-icon-active"><use href="#circle-half"></use></svg><i data-feather="chevron-down"></i>
</button>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme-text">
<li>
<button type="button" class="btn dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false">
<svg class="bi me-2 theme-icon"><use href="#sun-fill"></use></svg>
Light
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg></button>
</li>
<li>
<button type="button" class="btn dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="false">
<svg class="bi me-2 theme-icon"><use href="#moon-stars-fill"></use></svg>
Dark
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg></button>
</li>
<li>
<button type="button" class="btn dropdown-item d-flex align-items-center active" data-bs-theme-value="auto" aria-pressed="true">
<svg class="bi me-2 theme-icon"><use href="#circle-half"></use></svg>
Auto
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg></button>
</li>
</ul>
</li>
</div>
<div class="dropdown" id="instructor-dropdown">
<button class="btn btn-secondary dropdown-toggle bordered-button" type="button" id="dropdownMenu1" data-bs-toggle="dropdown" aria-expanded="false">
<i aria-hidden="true" class="icon" data-feather="eye"></i> Learner View <i data-feather="chevron-down"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><button class="dropdown-item" type="button" onclick="window.location.href='instructor/aio.html';">Instructor View</button></li>
</ul>
</div>
</div>
</div>
<hr></header><nav class="navbar navbar-expand-xl bottom-nav incubator" aria-label="Main Navigation"><div class="container-fluid nav-container">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle Navigation">
<span class="navbar-toggler-icon"></span>
<span class="menu-title">Menu</span>
</button>
<div class="nav-logo">
<img class="small-logo" alt="Carpentries Incubator" src="assets/images/incubator-logo-sm.svg">
</div>
<div class="lesson-title-md">
Introduction to deep learning
</div>
<div class="search-icon-sm">
<!-- TODO: do not show until we have search
<i role="img" aria-label="Search the All In One page" data-feather="search"></i>
-->
</div>
<div class="desktop-nav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<span class="lesson-title">
Introduction to deep learning
</span>
</li>
<li class="nav-item">
<a class="nav-link" href="key-points.html">Key Points</a>
</li>
<li class="nav-item">
<a class="nav-link" href="reference.html#glossary">Glossary</a>
</li>
<li class="nav-item">
<a class="nav-link" href="profiles.html">Learner Profiles</a>
</li>
<li class="nav-item dropdown">
<button class="nav-link dropdown-toggle" id="navbarDropdown" data-bs-toggle="dropdown" aria-expanded="false">
More <i data-feather="chevron-down"></i>
</button>
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
<li><a class="dropdown-item" href="reference.html">Reference</a></li>
</ul>
</li>
</ul>
</div>
<!--
<form class="d-flex col-md-2 search-form">
<fieldset disabled>
<input class="form-control me-2 searchbox" type="search" placeholder="" aria-label="">
<button class="btn btn-outline-success tablet-search-button" type="submit">
<i class="search-icon" data-feather="search" role="img" aria-label="Search the All In One page"></i>
</button>
</fieldset>
</form>
-->
<a id="search-button" class="btn btn-primary" href="aio.html" role="button" aria-label="Search the All In One page">Search the All In One page</a>
</div>
<!--/div.container-fluid -->
</nav><div class="col-md-12 mobile-title">
Introduction to deep learning
</div>
<aside class="col-md-12 lesson-progress"><div style="width: %" class="percentage">
%
</div>
<div class="progress incubator">
<div class="progress-bar incubator" role="progressbar" style="width: %" aria-valuenow="" aria-label="Lesson Progress" aria-valuemin="0" aria-valuemax="100">
</div>
</div>
</aside><div class="container">
<div class="row">
<!-- START: inst/pkgdown/templates/navbar.html -->
<div id="sidebar-col" class="col-lg-4">
<div id="sidebar" class="sidebar">
<nav aria-labelledby="flush-headingEleven"><button role="button" aria-label="close menu" alt="close menu" aria-expanded="true" aria-controls="sidebar" class="collapse-toggle" data-collapse="Collapse " data-episodes="Episodes ">
<i class="search-icon" data-feather="x" role="img"></i>
</button>
<div class="sidebar-inner">
<div class="row mobile-row" id="theme-row-mobile">
<div class="col" id="theme-selector">
<li class="nav-item dropdown" id="theme-button-list">
<button class="btn btn-link nav-link px-0 px-lg-2 dropdown-toggle d-flex align-items-center" id="bd-theme" type="button" aria-expanded="false" data-bs-toggle="dropdown" data-bs-display="static" aria-label="Toggle theme (auto)">
<svg class="bi my-1 theme-icon-active"><use href="#circle-half"></use></svg><span class="d-lg-none ms-1" id="bd-theme-text">Toggle Theme</span>
</button>
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="bd-theme-text">
<li>
<button type="button" class="btn dropdown-item d-flex align-items-center" data-bs-theme-value="light" aria-pressed="false">
<svg class="bi me-2 theme-icon"><use href="#sun-fill"></use></svg>
Light
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg></button>
</li>
<li>
<button type="button" class="btn dropdown-item d-flex align-items-center" data-bs-theme-value="dark" aria-pressed="false">
<svg class="bi me-2 theme-icon"><use href="#moon-stars-fill"></use></svg>
Dark
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg></button>
</li>
<li>
<button type="button" class="btn dropdown-item d-flex align-items-center active" data-bs-theme-value="auto" aria-pressed="true">
<svg class="bi me-2 theme-icon"><use href="#circle-half"></use></svg>
Auto
<svg class="bi ms-auto d-none"><use href="#check2"></use></svg></button>
</li>
</ul>
</li>
</div>
</div>
<div class="row mobile-row">
<div class="col">
<div class="sidenav-view-selector">
<div class="accordion accordion-flush" id="accordionFlush9">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingNine">
<button class="accordion-button collapsed" id="instructor" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseNine" aria-expanded="false" aria-controls="flush-collapseNine">
<i id="eye" aria-hidden="true" class="icon" data-feather="eye"></i> Learner View
</button>
</h2>
<div id="flush-collapseNine" class="accordion-collapse collapse" aria-labelledby="flush-headingNine" data-bs-parent="#accordionFlush2">
<div class="accordion-body">
<a href="instructor/aio.html">Instructor View</a>
</div>
</div>
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
</div>
<!--div.sidenav-view-selector -->
</div>
<!--/div.col -->
<hr>
</div>
<!--/div.mobile-row -->
<div class="accordion accordion-flush" id="accordionFlush11">
<div class="accordion-item">
<button id="chapters" class="accordion-button show" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseEleven" aria-expanded="false" aria-controls="flush-collapseEleven">
<h2 class="accordion-header chapters" id="flush-headingEleven">
EPISODES
</h2>
</button>
<div id="flush-collapseEleven" class="accordion-collapse show collapse" aria-labelledby="flush-headingEleven" data-bs-parent="#accordionFlush11">
<div class="accordion-body">
<div class="accordion accordion-flush" id="accordionFlush1">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading1">
<a href="index.html">Summary and Setup</a>
</div>
<!--/div.accordion-header-->
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush2">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading2">
<a href="1-introduction.html">1. Introduction</a>
</div>
<!--/div.accordion-header-->
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush3">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading3">
<a href="2-keras.html">2. Classification by a neural network using Keras</a>
</div>
<!--/div.accordion-header-->
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush4">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading4">
<a href="3-monitor-the-model.html">3. Monitor the training process</a>
</div>
<!--/div.accordion-header-->
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush5">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading5">
<a href="4-advanced-layer-types.html">4. Advanced layer types</a>
</div>
<!--/div.accordion-header-->
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush6">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading6">
<a href="5-transfer-learning.html">5. Transfer learning</a>
</div>
<!--/div.accordion-header-->
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
<div class="accordion accordion-flush" id="accordionFlush7">
<div class="accordion-item">
<div class="accordion-header" id="flush-heading7">
<a href="6-outlook.html">6. Outlook</a>
</div>
<!--/div.accordion-header-->
</div>
<!--/div.accordion-item-->
</div>
<!--/div.accordion-flush-->
</div>
</div>
</div>
<hr class="half-width">
<div class="accordion accordion-flush lesson-resources" id="accordionFlush12">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingTwelve">
<button class="accordion-button collapsed" id="lesson-resources" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseTwelve" aria-expanded="false" aria-controls="flush-collapseTwelve">
RESOURCES
</button>
</h2>
<div id="flush-collapseTwelve" class="accordion-collapse collapse" aria-labelledby="flush-headingTwelve" data-bs-parent="#accordionFlush12">
<div class="accordion-body">
<ul>
<li>
<a href="key-points.html">Key Points</a>
</li>
<li>
<a href="reference.html#glossary">Glossary</a>
</li>
<li>
<a href="profiles.html">Learner Profiles</a>
</li>
<li><a href="reference.html">Reference</a></li>
</ul>
</div>
</div>
</div>
</div>
<hr class="half-width lesson-resources">
<a href="aio.html">See all in one page</a>
<hr class="d-none d-sm-block d-md-none">
<div class="d-grid gap-1">
</div>
</div>
<!-- /div.accordion -->
</div>
<!-- /div.sidebar-inner -->
</nav>
</div>
<!-- /div.sidebar -->
</div>
<!-- /div.sidebar-col -->
<!-- END: inst/pkgdown/templates/navbar.html-->
<!-- START: inst/pkgdown/templates/content-extra.html -->
<div class="col-xl-8 col-lg-12 primary-content">
<main id="main-content" class="main-content"><div class="container lesson-content">
<section id="aio-1-introduction"><p>Content from <a href="1-introduction.html">Introduction</a></p>
<hr>
<p>Last updated on 2024-12-03 |
<a href="https://github.com/carpentries-incubator/deep-learning-intro/edit/main/episodes/1-introduction.Rmd" class="external-link">Edit this page <i aria-hidden="true" data-feather="edit"></i></a></p>
<div class="text-end">
<button role="button" aria-pressed="false" tabindex="0" id="expand-code" class="pull-right" data-expand="Expand All Solutions " data-collapse="Collapse All Solutions "> Expand All Solutions <i aria-hidden="true" data-feather="plus"></i></button>
</div>
<div class="overview card">
<h2 class="card-header">Overview</h2>
<div class="row g-0">
<div class="col-md-4">
<div class="card-body">
<div class="inner">
<h3 class="card-title">Questions</h3>
<ul>
<li>What is deep learning?</li>
<li>What is a neural network?</li>
<li>Which operations are performed by a single neuron?</li>
<li>How do neural networks learn?</li>
<li>When does it make sense to use and not use deep learning?</li>
<li>What are tools involved in deep learning?</li>
<li>What is the workflow for deep learning?</li>
<li>Why did we choose to use Keras in this lesson?</li>
</ul>
</div>
</div>
</div>
<div class="col-md-8">
<div class="card-body">
<div class="inner bordered">
<h3 class="card-title">Objectives</h3>
<ul>
<li>Define deep learning</li>
<li>Describe how a neural network is build up</li>
<li>Explain the operations performed by a single neuron</li>
<li>Describe what a loss function is</li>
<li>Recall the sort of problems for which deep learning is a useful
tool</li>
<li>List some of the available tools for deep learning</li>
<li>Recall the steps of a deep learning workflow</li>
<li>Test that you have correctly installed the Keras, Seaborn and
scikit-learn libraries</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<section><h2 class="section-heading" id="what-is-deep-learning">What is Deep Learning?<a class="anchor" aria-label="anchor" href="#what-is-deep-learning"></a>
</h2>
<hr class="half-width">
<div class="section level3">
<h3 id="deep-learning-machine-learning-and-artificial-intelligence">Deep Learning, Machine Learning and Artificial Intelligence<a class="anchor" aria-label="anchor" href="#deep-learning-machine-learning-and-artificial-intelligence"></a>
</h3>
<p>Deep learning (DL) is just one of many techniques collectively known
as machine learning. Machine learning (ML) refers to techniques where a
computer can “learn” patterns in data, usually by being shown numerous
examples to train it. People often talk about machine learning being a
form of artificial intelligence (AI). Definitions of artificial
intelligence vary, but usually involve having computers mimic the
behaviour of intelligent biological systems. Since the 1950s many works
of science fiction have dealt with the idea of an artificial
intelligence which matches (or exceeds) human intelligence in all areas.
Although there have been great advances in AI and ML research recently
we can only come close to human like intelligence in a few specialist
areas and are still a long way from a general purpose AI. The image
below shows some differences between artificial intelligence, machine
learning and deep learning.</p>
<figure><img src="fig/01_AI_ML_DL_differences.jpg" style="width:60.0%" alt="An infographic showing the relation of artificial intelligence, machine learning, and deep learning. Deep learning is a specific subset of machine learning algorithms. Machine learning is one of the approaches to artificial intelligence." class="figure mx-auto d-block"></figure><div class="section level4">
<h4 id="neural-networks">Neural Networks<a class="anchor" aria-label="anchor" href="#neural-networks"></a>
</h4>
<p>A neural network is an artificial intelligence technique loosely
based on the way neurons in the brain work. A neural network consists of
connected computational units called <strong>neurons</strong>. Let’s
look at the operations of a single neuron.</p>
<div class="section level5">
<h5 id="a-single-neuron">A single neuron<a class="anchor" aria-label="anchor" href="#a-single-neuron"></a>
</h5>
<p>Each neuron …</p>
<ul>
<li>has one or more inputs (<span class="math inline">\(x_1, x_2,
...\)</span>), e.g. input data expressed as floating point numbers</li>
<li>most of the time, each neuron conducts 3 main operations:
<ul>
<li>take the weighted sum of the inputs where (<span class="math inline">\(w_1, w_2, ...\)</span>) indicate weights</li>
<li>add an extra constant weight (i.e. a bias term) to this weighted
sum</li>
<li>apply an <strong>activation function</strong> to the output so far,
we will explain activation functions</li>
</ul>
</li>
<li>return one output value, again a floating point number.</li>
<li>one example equation to calculate the output for a neuron is: <span class="math inline">\(output = Activation(\sum_{i} (x_i*w_i) +
bias)\)</span>
</li>
</ul>
<figure><img src="fig/01_neuron.png" alt="A diagram of a single artificial neuron combining inputs and weights using an activation function." width="600" class="figure mx-auto d-block"></figure>
</div>
<div class="section level5">
<h5 id="activation-functions">Activation functions<a class="anchor" aria-label="anchor" href="#activation-functions"></a>
</h5>
<p>The goal of the activation function is to convert the weighted sum of
the inputs to the output signal of the neuron. This output is then
passed on to the next layer of the network. There are many different
activation functions, 3 of them are introduced in the exercise
below.</p>
<div id="activation-functions-1" class="callout challenge">
<div class="callout-square">
<i class="callout-icon" data-feather="zap"></i>
</div>
<div id="activation-functions-1" class="callout-inner">
<h3 class="callout-title">Activation functions</h3>
<div class="callout-content">
<p>Look at the following activation functions:</p>
<p><strong>A. Sigmoid activation function</strong> The sigmoid
activation function is given by: <span class="math display">\[ f(x) =
\frac{1}{1 + e^{-x}} \]</span></p>
<p><img src="fig/01_sigmoid.svg" style="width:70.0%" alt="Plot of the sigmoid function" align="left" class="figure"><br clear="all"></p>
<p><strong>B. ReLU activation function</strong> The Rectified Linear
Unit (ReLU) activation function is defined as: <span class="math display">\[ f(x) = \max(0, x) \]</span></p>
<p>This involves a simple comparison and maximum calculation, which are
basic operations that are computationally inexpensive. It is also simple
to compute the gradient: 1 for positive inputs and 0 for negative
inputs.</p>
<p><img src="fig/01_relu.svg" style="width:70.0%" alt="Plot of the ReLU function" align="left" class="figure"><br clear="all"></p>
<p><strong>C. Linear (or identity) activation function
(output=input)</strong> The linear activation function is simply the
identity function: <span class="math display">\[ f(x) = x \]</span></p>
<p><img src="fig/01_identity_function.svg" style="width:70.0%" alt="Plot of the Identity function" align="left" class="figure"><br clear="all"></p>
<p>Combine the following statements to the correct activation
function:</p>
<ol style="list-style-type: decimal">
<li>This function enforces the activation of a neuron to be between 0
and 1</li>
<li>This function is useful in regression tasks when applied to an
output neuron</li>
<li>This function is the most popular activation function in hidden
layers, since it introduces non-linearity in a computationally efficient
way.</li>
<li>This function is useful in classification tasks when applied to an
output neuron</li>
<li>(optional) For positive values this function results in the same
activations as the identity function.</li>
<li>(optional) This function is not differentiable at 0</li>
<li>(optional) This function is the default for Dense layers (search the
Keras documentation!)</li>
</ol>
<p><em>Activation function plots by Laughsinthestocks - Own work, CC
BY-SA 4.0, <a href="https://commons.wikimedia.org/w/index.php?curid=44920411" class="external-link uri">https://commons.wikimedia.org/w/index.php?curid=44920411</a>,
<a href="https://commons.wikimedia.org/w/index.php?curid=44920600" class="external-link uri">https://commons.wikimedia.org/w/index.php?curid=44920600</a>,
<a href="https://commons.wikimedia.org/w/index.php?curid=44920533" class="external-link uri">https://commons.wikimedia.org/w/index.php?curid=44920533</a></em></p>
</div>
</div>
</div>
<div id="accordionSolution1" class="accordion challenge-accordion accordion-flush">
<div class="accordion-item">
<button class="accordion-button solution-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSolution1" aria-expanded="false" aria-controls="collapseSolution1">
<h4 class="accordion-header" id="headingSolution1"> Show me the solution </h4>
</button>
<div id="collapseSolution1" class="accordion-collapse collapse" data-bs-parent="#accordionSolution1" aria-labelledby="headingSolution1">
<div class="accordion-body">
<ol style="list-style-type: decimal">
<li>A</li>
<li>C</li>
<li>B</li>
<li>A</li>
<li>B</li>
<li>B</li>
<li>C</li>
</ol>
</div>
</div>
</div>
</div>
</div>
<div class="section level5">
<h5 id="combining-multiple-neurons-into-a-network">Combining multiple neurons into a network<a class="anchor" aria-label="anchor" href="#combining-multiple-neurons-into-a-network"></a>
</h5>
<p>Multiple neurons can be joined together by connecting the output of
one to the input of another. These connections are associated with
weights that determine the ‘strength’ of the connection, the weights are
adjusted during training. In this way, the combination of neurons and
connections describe a computational graph, an example can be seen in
the image below.</p>
<p>In most neural networks, neurons are aggregated into layers. Signals
travel from the input layer to the output layer, possibly through one or
more intermediate layers called hidden layers. The image below shows an
example of a neural network with three layers, each circle is a neuron,
each line is an edge and the arrows indicate the direction data moves
in.</p>
<figure><img src="fig/01_neural_net.png" alt="A diagram of a three layer neural network with an input layer, one hidden layer, and an output layer." class="figure mx-auto d-block"><div class="figcaption">Image credit: Glosser.ca, CC BY-SA 3.0 <a href="https://creativecommons.org/licenses/by-sa/3.0" class="external-link uri">https://creativecommons.org/licenses/by-sa/3.0</a>, via
Wikimedia Commons, <a href="https://commons.wikimedia.org/wiki/File:Colored_neural_network.svg" class="external-link">original
source</a>
</div>
</figure><div id="neural-network-calculations" class="callout challenge">
<div class="callout-square">
<i class="callout-icon" data-feather="zap"></i>
</div>
<div id="neural-network-calculations" class="callout-inner">
<h3 class="callout-title">Neural network calculations</h3>
<div class="callout-content">
<p>.</p>
<div class="section level4">
<h4 id="calculate-the-output-for-one-neuron">1. Calculate the output for one neuron<a class="anchor" aria-label="anchor" href="#calculate-the-output-for-one-neuron"></a>
</h4>
<p>Suppose we have:</p>
<ul>
<li>Input: X = (0, 0.5, 1)</li>
<li>Weights: W = (-1, -0.5, 0.5)</li>
<li>Bias: b = 1</li>
<li>Activation function <em>relu</em>:
<code>f(x) = max(x, 0)</code>
</li>
</ul>
<p>What is the output of the neuron?</p>
<p><em>Note: You can use whatever you like: brain only, pen&paper,
Python, Excel…</em></p>
</div>
<div class="section level4">
<h4 id="optional-calculate-outputs-for-a-network">2. (optional) Calculate outputs for a network<a class="anchor" aria-label="anchor" href="#optional-calculate-outputs-for-a-network"></a>
</h4>
<p>Have a look at the following network where:</p>
<ul>
<li>
<span class="math inline">\(X_1\)</span> and <span class="math inline">\(X_2\)</span> denote the two inputs of the
network.</li>
<li>
<span class="math inline">\(h_1\)</span> and <span class="math inline">\(h_2\)</span> denote the two neurons in the hidden
layer. They both have ReLU activation functions.</li>
<li>
<span class="math inline">\(h_1\)</span> and <span class="math inline">\(h_2\)</span> denotes the output neuron. It has a
ReLU activation function.</li>
<li>The value on the arrows represent the weight associated to that
input to the neuron.</li>
<li>
<span class="math inline">\(b_i\)</span> denotes the bias term of
that specific neuron <img src="fig/01_xor_exercise.png" alt="A diagram of a neural network with 2 inputs, 2 hidden layer neurons, and 1 output." width="400" class="figure">
</li>
</ul>
<ol style="list-style-type: lower-alpha">
<li>Calculate the output of the network for the following combinations
of inputs:</li>
</ol>
<table class="table">
<thead><tr class="header">
<th>x1</th>
<th>x2</th>
<th>y</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>0</td>
<td>0</td>
<td>..</td>
</tr>
<tr class="even">
<td>0</td>
<td>1</td>
<td>..</td>
</tr>
<tr class="odd">
<td>1</td>
<td>0</td>
<td>..</td>
</tr>
<tr class="even">
<td>1</td>
<td>1</td>
<td>..</td>
</tr>
</tbody>
</table>
<ol start="2" style="list-style-type: lower-alpha">
<li>What logical problem does this network solve?</li>
</ol>
</div>
</div>
</div>
</div>
<div id="accordionSolution2" class="accordion challenge-accordion accordion-flush">
<div class="accordion-item">
<button class="accordion-button solution-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSolution2" aria-expanded="false" aria-controls="collapseSolution2">
<h4 class="accordion-header" id="headingSolution2"> Show me the solution </h4>
</button>
<div id="collapseSolution2" class="accordion-collapse collapse" data-bs-parent="#accordionSolution2" aria-labelledby="headingSolution2">
<div class="accordion-body">
<div class="section level4">
<h4 id="calculate-the-output-for-one-neuron-1">1: calculate the output for one neuron<a class="anchor" aria-label="anchor" href="#calculate-the-output-for-one-neuron-1"></a>
</h4>
<p>You can calculate the output as follows:</p>
<ul>
<li>Weighted sum of input:
<code>0 * (-1) + 0.5 * (-0.5) + 1 * 0.5 = 0.25</code>
</li>
<li>Add the bias: <code>0.25 + 1 = 1.25</code>
</li>
<li>Apply activation function: <code>max(1.25, 0) = 1.25</code>
</li>
</ul>
<p>So, the neuron’s output is <code>1.25</code></p>
</div>
<div class="section level4">
<h4 id="calculate-outputs-for-a-network">2: Calculate outputs for a network<a class="anchor" aria-label="anchor" href="#calculate-outputs-for-a-network"></a>
</h4>
<ol style="list-style-type: lower-alpha">
<li><table class="table">
<thead><tr class="header">
<th>x1</th>
<th>x2</th>
<th>y</th>
</tr></thead>
<tbody>
<tr class="odd">
<td>0</td>
<td>0</td>
<td><strong>0</strong></td>
</tr>
<tr class="even">
<td>0</td>
<td>1</td>
<td><strong>1</strong></td>
</tr>
<tr class="odd">
<td>1</td>
<td>1</td>
<td><strong>0</strong></td>
</tr>
<tr class="even">
<td>1</td>
<td>0</td>
<td><strong>1</strong></td>
</tr>
</tbody>
</table></li>
<li>This solves the XOR logical problem, the output is 1 if only one of
the two inputs is 1.</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section level5">
<h5 id="what-makes-deep-learning-deep-learning">What makes deep learning deep learning?<a class="anchor" aria-label="anchor" href="#what-makes-deep-learning-deep-learning"></a>
</h5>
<p>Neural networks aren’t a new technique, they have been around since
the late 1940s. But until around 2010 neural networks tended to be quite
small, consisting of only 10s or perhaps 100s of neurons. This limited
them to only solving quite basic problems. Around 2010, improvements in
computing power and the algorithms for training the networks made much
larger and more powerful networks practical. These are known as deep
neural networks or deep learning.</p>
<p>Deep learning requires extensive training using example data which
shows the network what output it should produce for a given input. One
common application of deep learning is <a href="https://glosario.carpentries.org/en/#classification" class="external-link">classifying</a>
images. Here the network will be trained by being “shown” a series of
images and told what they contain. Once the network is trained it should
be able to take another image and correctly classify its contents.</p>
<p>But we are not restricted to just using images, any kind of data can
be learned by a deep learning neural network. This makes them able to
appear to learn a set of complex rules only by being shown what the
inputs and outputs of those rules are instead of being taught the actual
rules. Using these approaches, deep learning networks have been taught
to play video games and even drive cars.</p>
<p>The data on which networks are trained usually has to be quite
extensive, typically including thousands of examples. For this reason
they are not suited to all applications and should be considered just
one of many machine learning techniques which are available.</p>
<p>While traditional “shallow” networks might have had between three and
five layers, deep networks often have tens or even hundreds of layers.
This leads to them having millions of individual weights. The image
below shows a diagram of all the layers on a deep learning network
designed to detect pedestrians in images.</p>
<p>This image is from the paper <a href="https://doi.org/10.1155/2018/3518959" class="external-link">“An Efficient Pedestrian
Detection Method Based on YOLOv2” by Zhongmin Liu, Zhicai Chen, Zhanming
Li, and Wenjin Hu published in Mathematical Problems in Engineering,
Volume 2018</a></p>
<figure><img src="fig/01_deep_network.png" alt="An example of a deep neural network" class="figure mx-auto d-block"><div class="figcaption">
<strong>A visual representation of a deep neural
network used to detect pedestrians in images.</strong> There are too
many neurons to draw all of them, so each layer is represented by a
panel, with values indicating how many neurons are in each dimension of
the layer. Note that this model has 3-dimensional layers instead of the
1-dimensional layers that we introduced before. The input (left most)
layer of the network is an image of 448 x 448 pixels and 3 RGB channels.
The final (right most) layer of the network outputs a zero or one to
determine if the input data belongs to the class of data we are
interested in. The output of the previous layer is the input to the next
layer. Note that the color coding refers to different layer types that
will be introduced one by one as we proceed in this lesson.</div>
</figure>
</div>
</div>
</div>
<div class="section level3">
<h3 id="how-do-neural-networks-learn">How do neural networks learn?<a class="anchor" aria-label="anchor" href="#how-do-neural-networks-learn"></a>
</h3>
<p>What happens in a neural network during the training process? The
ultimate goal is of course to find a model that makes predictions that
are as close to the target value as possible. In other words, the goal
of training is to find the best set of parameters (weights and biases)
that bring the error between prediction and expected value to a minimum.
The total error between prediction and expected value is quantified in a
loss function (also called cost function). There are lots of loss
functions to pick from, and it is important that you pick one that
matches your problem definition well. We will look at an example of a
loss function in the next exercise.</p>
<div id="exercise-loss-function" class="callout challenge">
<div class="callout-square">
<i class="callout-icon" data-feather="zap"></i>
</div>
<div id="exercise-loss-function" class="callout-inner">
<h3 class="callout-title">Exercise: Loss function</h3>
<div class="callout-content">
<p>.</p>
<div class="section level4">
<h4 id="compute-the-mean-squared-error">1. Compute the Mean Squared Error<a class="anchor" aria-label="anchor" href="#compute-the-mean-squared-error"></a>
</h4>
<p>One of the simplest loss functions is the Mean Squared Error. MSE =
<span class="math inline">\(\frac{1}{n}
\Sigma_{i=1}^n({y}-\hat{y})^2\)</span> . It is the mean of all squared
errors, where the error is the difference between the predicted and
expected value. In the following table, fill in the missing values in
the ‘squared error’ column. What is the MSE loss for the predictions on
these 4 samples?</p>
<table class="table">
<thead><tr class="header">
<th><strong>Prediction</strong></th>
<th><strong>Expected value</strong></th>
<th><strong>Squared error</strong></th>
</tr></thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>-1</td>
<td>4</td>
</tr>
<tr class="even">
<td>2</td>
<td>-1</td>
<td>..</td>
</tr>
<tr class="odd">
<td>0</td>
<td>0</td>
<td>..</td>
</tr>
<tr class="even">
<td>3</td>
<td>2</td>
<td>..</td>
</tr>
<tr class="odd">
<td></td>
<td><strong>MSE:</strong></td>
<td>..</td>
</tr>
</tbody>
</table>
</div>
<div class="section level4">
<h4 id="optional-huber-loss">2. (optional) Huber loss<a class="anchor" aria-label="anchor" href="#optional-huber-loss"></a>
</h4>
<p>A more complicated and less used loss function for regression is the
<a href="https://keras.io/api/losses/regression_losses/#huber-class" class="external-link">Huber
loss</a>.</p>
<p>Below you see the Huber loss (green, delta = 1) and Squared error
loss (blue) as a function of <code>y_true - y_pred</code>.</p>
<figure><img src="fig/01_huber_loss.png" alt="Line plot comparing squared error loss function with the Huber loss function where delta = 1, showing the cost of prediction error of both functions equal where y_true - y_pred is between -1 and 1, then rising linearly with the Huber loss function as y_true diverges further from y_pred, as opposed to expontentially for the squared error function." width="400" class="figure mx-auto d-block"></figure><p>Which loss function is more sensitive to outliers?</p>
</div>
</div>
</div>
</div>
<div id="accordionSolution3" class="accordion challenge-accordion accordion-flush">
<div class="accordion-item">
<button class="accordion-button solution-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSolution3" aria-expanded="false" aria-controls="collapseSolution3">
<h4 class="accordion-header" id="headingSolution3"> Show me the solution </h4>
</button>
<div id="collapseSolution3" class="accordion-collapse collapse" data-bs-parent="#accordionSolution3" aria-labelledby="headingSolution3">
<div class="accordion-body">
<div class="section level4">
<h4 id="compute-the-mean-squared-error-1">1. ‘Compute the Mean Squared Error’<a class="anchor" aria-label="anchor" href="#compute-the-mean-squared-error-1"></a>
</h4>
<table class="table">
<thead><tr class="header">
<th><strong>Prediction</strong></th>
<th><strong>Expected value</strong></th>
<th><strong>Squared error</strong></th>
</tr></thead>
<tbody>
<tr class="odd">
<td>1</td>
<td>-1</td>
<td>4</td>
</tr>
<tr class="even">
<td>2</td>
<td>-1</td>
<td>9</td>
</tr>
<tr class="odd">
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="even">
<td>3</td>
<td>2</td>
<td>1</td>
</tr>
<tr class="odd">
<td></td>
<td><strong>MSE:</strong></td>
<td>3.5</td>
</tr>
</tbody>
</table>
</div>
<div class="section level4">
<h4 id="huber-loss">2. ‘Huber loss’<a class="anchor" aria-label="anchor" href="#huber-loss"></a>
</h4>
<p>The squared error loss is more sensitive to outliers. Errors between
-1 and 1 result in the same loss value for both loss functions. But,
larger errors (in other words: outliers) result in quadratically larger
losses for the Mean Squared Error, while for the Huber loss they only
increase linearly.</p>
</div>
</div>
</div>
</div>
</div>
<p>So, a loss function quantifies the total error of the model. The
process of adjusting the weights in such a way as to minimize the loss
function is called ‘optimization’. We will dive further into how
optimization works in episode 3. For now, it is enough to understand
that during training the weights in the network are adjusted so that the
loss decreases through the process of optimization. This ultimately
results in a low loss, and this, generally, implies predictions that are
closer to the expected values.</p>
</div>
<div class="section level3">
<h3 id="what-sort-of-problems-can-deep-learning-solve">What sort of problems can deep learning solve?<a class="anchor" aria-label="anchor" href="#what-sort-of-problems-can-deep-learning-solve"></a>
</h3>
<ul>
<li>Pattern/object recognition</li>
<li>Segmenting images (or any data)</li>
<li>Translating between one set of data and another, for example natural
language translation.</li>
<li>Generating new data that looks similar to the training data, often
used to create synthetic datasets, art or even “deepfake” videos.
<ul>
<li>This can also be used to give the illusion of enhancing data, for
example making images look sharper, video look smoother or adding colour
to black and white images. But beware of this, it is not an accurate
recreation of the original data, but a recreation based on something
statistically similar, effectively a digital imagination of what that
data could look like.</li>
</ul>
</li>
</ul>
<div class="section level4">
<h4 id="examples-of-deep-learning-in-research">Examples of Deep Learning in Research<a class="anchor" aria-label="anchor" href="#examples-of-deep-learning-in-research"></a>
</h4>
<p>Here are just a few examples of how deep learning has been applied to
some research problems. Note: some of these articles might be behind
paywalls.</p>
<ul>
<li><a href="https://arxiv.org/abs/2003.09871" class="external-link">Detecting COVID-19 in
chest X-ray images</a></li>
<li><a href="https://arxiv.org/abs/1610.09460" class="external-link">Forecasting building
energy load</a></li>
<li><a href="https://pubmed.ncbi.nlm.nih.gov/29039790/" class="external-link">Protein function
prediction</a></li>
<li><a href="https://pubs.rsc.org/en/content/articlelanding/2018/sc/c7sc04934j" class="external-link">Simulating
Chemical Processes</a></li>
<li><a href="https://heritagesciencejournal.springeropen.com/articles/10.1186/s40494-020-0355-x" class="external-link">Help
to restore ancient murals</a></li>
</ul>
</div>
</div>
<div class="section level3">
<h3 id="what-sort-of-problems-can-deep-learning-not-solve">What sort of problems can deep learning not solve?<a class="anchor" aria-label="anchor" href="#what-sort-of-problems-can-deep-learning-not-solve"></a>
</h3>
<ul>
<li>Any case where only a small amount of training data is
available.</li>
<li>Tasks requiring an explanation of how the answer was arrived
at.</li>
<li>Classifying things which are nothing like their training data.</li>
</ul>
</div>
<div class="section level3">
<h3 id="what-sort-of-problems-can-deep-learning-solve-but-should-not-be-used-for">What sort of problems can deep learning solve, but should not be
used for?<a class="anchor" aria-label="anchor" href="#what-sort-of-problems-can-deep-learning-solve-but-should-not-be-used-for"></a>
</h3>
<p>Deep learning needs a lot of computational power, for this reason it
often relies on specialised hardware like <a href="https://glosario.carpentries.org/en/#gpu" class="external-link">graphical processing
units (GPUs)</a>. Many computational problems can be solved using less
intensive techniques, but could still technically be solved with deep
learning.</p>
<p>The following could technically be achieved using deep learning, but
it would probably be a very wasteful way to do it:</p>
<ul>
<li>Logic operations, such as computing totals, averages, ranges etc.
(see <a href="https://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow" class="external-link">this
example</a> applying deep learning to solve the <a href="https://en.wikipedia.org/wiki/Fizz_buzz" class="external-link">“FizzBuzz” problem</a>
often used for programming interviews)</li>
<li>Modelling well defined systems, where the equations governing them
are known and understood.</li>
<li>Basic computer vision tasks such as <a href="https://en.wikipedia.org/wiki/Edge_detection" class="external-link">edge detection</a>,
decreasing colour depth or blurring an image.</li>
</ul>
<div id="deep-learning-problems-exercise" class="callout challenge">
<div class="callout-square">
<i class="callout-icon" data-feather="zap"></i>
</div>
<div id="deep-learning-problems-exercise" class="callout-inner">
<h3 class="callout-title">Deep Learning Problems Exercise</h3>
<div class="callout-content">
<p>Which of the following would you apply deep learning to?</p>
<ol style="list-style-type: decimal">
<li>Recognising whether or not a picture contains a bird.</li>
<li>Calculating the median and interquartile range of a dataset.</li>
<li>Identifying MRI images of a rare disease when only one or two
example images available for training.</li>
<li>Identifying people in pictures after being trained only on cats and
dogs.</li>
<li>Translating English into French.</li>
</ol>
</div>
</div>
</div>
<div id="accordionSolution4" class="accordion challenge-accordion accordion-flush">
<div class="accordion-item">
<button class="accordion-button solution-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseSolution4" aria-expanded="false" aria-controls="collapseSolution4">
<h4 class="accordion-header" id="headingSolution4"> Show me the solution </h4>
</button>
<div id="collapseSolution4" class="accordion-collapse collapse" data-bs-parent="#accordionSolution4" aria-labelledby="headingSolution4">