forked from carpentries-incubator/deep-learning-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5-outlook.html
644 lines (603 loc) · 34.6 KB
/
5-outlook.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
<!DOCTYPE html>
<!-- START: inst/pkgdown/templates/layout.html --><!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><title>Introduction to deep learning: Outlook</title><meta name="viewport" content="width=device-width, initial-scale=1"><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="apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="manifest" href="site.webmanifest"><link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5"><meta name="msapplication-TileColor" content="#da532c"><meta name="theme-color" content="#ffffff"></head><body>
<header id="top" class="navbar navbar-expand-md navbar-light bg-white top-nav incubator"><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-6">
<div class="large-logo">
<img alt="Carpentries Incubator" src="assets/images/incubator-logo.svg"></div>
</div>
<div class="selector-container">
<div class="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/5-outlook.html';">Instructor View</button></li>
</ul></div>
</div>
</div>
<hr></header><nav class="navbar navbar-expand-xl navbar-light bg-white 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 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: 93%" class="percentage">
93%
</div>
<div class="progress incubator">
<div class="progress-bar incubator" role="progressbar" style="width: 93%" aria-valuenow="93" 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">
<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/5-outlook.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="accordionFlushcurrent">
<div class="accordion-item">
<div class="accordion-header" id="flush-headingcurrent">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapsecurrent" aria-expanded="true" aria-controls="flush-collapsecurrent">
<span class="visually-hidden">Current Chapter</span>
<span class="current-chapter">
5. Outlook
</span>
</button>
</div><!--/div.accordion-header-->
<div id="flush-collapsecurrent" class="accordion-collapse collapse show" aria-labelledby="flush-headingcurrent" data-bs-parent="#accordionFlushcurrent">
<div class="accordion-body">
<ul><li><a href="#real-world-application">Real-world application</a></li>
<li><a href="#organising-deep-learning-projects">Organising deep learning projects</a></li>
<li><a href="#next-steps">Next steps</a></li>
</ul></div><!--/div.accordion-body-->
</div><!--/div.accordion-collapse-->
</div><!--/div.accordion-item-->
</div><!--/div.accordion-flush-->
</div>
</div>
</div>
<hr class="half-width"><div class="accordion accordion-flush resources" id="accordionFlush12">
<div class="accordion-item">
<h2 class="accordion-header" id="flush-headingTwelve">
<button class="accordion-button collapsed" id="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 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-instructor.html -->
<div class="col-xl-8 col-lg-12 primary-content">
<nav class="lesson-content mx-md-4" aria-label="Previous and Next Chapter"><!-- content for small screens --><div class="d-block d-sm-block d-md-none">
<a class="chapter-link" href="4-advanced-layer-types.html"><i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>Previous</a>
<a class="chapter-link float-end" href="index.html">Next<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
</div>
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
<a class="chapter-link" href="4-advanced-layer-types.html" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
Previous: Advanced layer types
</a>
<a class="chapter-link float-end" href="index.html" rel="next">
Home
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
</div>
<hr></nav><main id="main-content" class="main-content"><div class="container lesson-content">
<h1>Outlook</h1>
<p>Last updated on 2024-04-30 |
<a href="https://github.com/carpentries-incubator/deep-learning-intro/edit/main/episodes/5-outlook.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>How does what I learned in this course translate to real-world
problems?</li>
<li>How do I organise a deep learning project?</li>
<li>What are next steps to take after this course?</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>Understand that what we learned in this course can be applied to
real-world problems</li>
<li>Use best practices for organising a deep learning project</li>
<li>Identify next steps to take after this course</li>
</ul></div>
</div>
</div>
</div>
</div>
<p>You have come to the end of this course. In this episode we will look
back at what we have learned so far, how to apply that to real-world
problems, and identify next steps to take to start applying deep
learning in your own projects.</p>
<section id="real-world-application"><h2 class="section-heading">Real-world application<a class="anchor" aria-label="anchor" href="#real-world-application"></a>
</h2>
<hr class="half-width"><p>To introduce the core concepts of deep learning we have used quite
simple machine learning problems. But how does what we learned so far
apply to real-world applications?</p>
<p>To illustrate that what we learned is actually the basis of succesful
applications in research, we will have a look at an example from the
field of cheminformatics.</p>
<p>We will have a look at <a href="https://github.com/matchms/ms2deepscore/blob/0.4.0/notebooks/MS2DeepScore_tutorial.ipynb" class="external-link">this
notebook</a>. It is part of the codebase for <a href="https://doi.org/10.1186/s13321-021-00558-4" class="external-link">this paper</a>.</p>
<p>In short, the deep learning problem is that of finding out how
similar two molecules are in terms of their molecular properties, based
on their mass spectrum. You can compare this to comparing two pictures
of animals, and predicting how similar they are. A siamese neural
network is used to solve the problem. In a siamese neural network you
have two input vectors, let’s say two images of animals or two mass
spectra. They pass through a base network. Instead of outputting a class
or number with one or a few output neurons, the output layer of the base
network is a whole vector of for example 100 neurons. After passing
through the base network, you end up with two of these vectors
representing the two inputs. The goal of the base network is to output a
meaningful representation of the input (this is called an embedding).
The next step is to compute the cosine similarity between these two
output vectors, cosine similarity is a measure for how similar two
vectors are to each other, ranging from 0 (completely different) to 1
(identical). This cosine similarity is compared to the actual similarity
between the two inputs and this error is used to update the weights in
the network.</p>
<p>Don’t worry if you do not fully understand the deep learning problem
and the approach that is taken here. We just want you to appreciate that
you already learned enough to be able to do this yourself in your own
domain.</p>
<div id="exercise-a-real-world-deep-learning-application" class="callout challenge">
<div class="callout-square">
<i class="callout-icon" data-feather="zap"></i>
</div>
<div id="exercise-a-real-world-deep-learning-application" class="callout-inner">
<h3 class="callout-title">Exercise: A real-world deep learning
application<a class="anchor" aria-label="anchor" href="#exercise-a-real-world-deep-learning-application"></a>
</h3>
<div class="callout-content">
<ol style="list-style-type: decimal"><li>Looking at the ‘Model training’ section of the notebook, what do you
recognize from what you learned in this course?</li>
<li>Can you identify the different steps of the deep learning workflow
in this notebook?</li>
<li>(Optional): Try to understand the neural network architecture from
the first figure of <a href="https://doi.org/10.1186/s13321-021-00558-4" class="external-link">the paper</a>.
<ol style="list-style-type: lower-alpha"><li>Why are there 10.000 neurons in the input layer?</li>
<li>What do you think would happen if you would decrease the size of
spectral embedding layer drastically, to for example 5 neurons?</li>
</ol></li>
</ol></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" aria-labelledby="headingSolution1" data-bs-parent="#accordionSolution1">
<div class="accordion-body">
<ol style="list-style-type: decimal"><li>The model summary for the Siamese model is more complex than what we
have seen so far, but it is basically a repetition of Dense, BatchNorm,
and Dropout layers. The syntax for training and evaluating the model is
the same as what we learned in this course. EarlyStopping as well as the
Adam optimizer is used.</li>
<li>The different steps are not as clearly defined as in this course,
but you should be able to identify ‘3: Data preparation’, ‘4: Choose a
pretrained model or start building architecture from scratch’, ‘5:
Choose a loss function and optimizer’, ‘6: Train the model’, ‘7: Make
predictions’ (which is called ‘Model inference’ in this notebook), and
‘10: Save model’.</li>
<li>(optional)
<ol style="list-style-type: lower-alpha"><li>Because the shape of the input is 10.000. More specifically, the
spectrum is binned into a size 10.000 vector, apparently this is a good
size to represent the mass spectrum.</li>
<li>This would force the neural network to have a representation of the
mass spectrum in only 5 numbers. This representation would probably be
more generic, but might fail to capture all the characteristics found in
the spectrum. This would likely result in underfitting.</li>
</ol></li>
</ol></div>
</div>
</div>
</div>
<p>Hopefully you can appreciate that what you learned in this course,
can be applied to real-world problems as well.</p>
<div id="extensive-data-preparation" class="callout">
<div class="callout-square">
<i class="callout-icon" data-feather="bell"></i>
</div>
<div id="extensive-data-preparation" class="callout-inner">
<h3 class="callout-title">Extensive data preparation<a class="anchor" aria-label="anchor" href="#extensive-data-preparation"></a>
</h3>
<div class="callout-content">
<p>You might have noticed that the data preparation for this example is
much more extensive than what we have done so far in this course. This
is quite common for applied deep learning projects. It is said that 90%
of the time in a deep learning problem is spent on data preparation, and
only 10% on modeling!</p>
</div>
</div>
</div>
<div id="discussion-large-language-models-and-prompt-engineering" class="callout discussion">
<div class="callout-square">
<i class="callout-icon" data-feather="message-circle"></i>
</div>
<div id="discussion-large-language-models-and-prompt-engineering" class="callout-inner">
<h3 class="callout-title">Discussion: Large Language Models and prompt
engineering<a class="anchor" aria-label="anchor" href="#discussion-large-language-models-and-prompt-engineering"></a>
</h3>
<div class="callout-content">
<p>Large Language Models (LLMs) are deep learning models that are able
to perform general-purpose language generation. They are trained on
large amounts of texts, such all pages of Wikipedia. In recent years the
quality of LLMs language understanding and generation has increased
tremendously, and since the launch of generative chatbot ChatGPT in 2022
the power of LLMs is now appreciated by the general public.</p>
<p>It is becoming more and more feasible to unleash this power in
scientific research. For example, the authors of <a href="https://doi.org/10.1021/jacs.3c05819" class="external-link">Zheng et al. (2023)</a>
guided ChatGPT in the automation of extracting chemical information from
a large amount of research articles. The authors did not implement a
deep learning model themselves, but instead they designed the right
input for ChatGPT (called a ‘prompt’) that would produce optimal
outputs. This is called prompt engineering. A highly simplified example
of such a prompt would be: “Given compounds X and Y and context Z, what
are the chemical details of the reaction?”</p>
<p>Developments in LLM research are moving fast, at the end of 2023 the
newest ChatGPT version <a href="https://openai.com/blog/chatgpt-can-now-see-hear-and-speak" class="external-link">could
take images and sound as input</a>. In theory, this means that you can
solve the Cifar-10 image classification problem from the previous
episode by prompt engineering, with prompts similar to “Which out of
these categories: [LIST OF CATEGORIES] is depicted in the image”.</p>
<p><strong>Discuss the following statement with your
neighbors:</strong></p>
<p><em>In a few years most machine learning problems in scientific
research can be solved with prompt engineering.</em></p>
</div>
</div>
</div>
</section><section id="organising-deep-learning-projects"><h2 class="section-heading">Organising deep learning projects<a class="anchor" aria-label="anchor" href="#organising-deep-learning-projects"></a>
</h2>
<hr class="half-width"><p>As you might have noticed already in this course, deep learning
projects can quickly become messy. Here follow some best practices for
keeping your projects organized:</p>
<div class="section level3">
<h3 id="organise-experiments-in-notebooks">1. Organise experiments in notebooks<a class="anchor" aria-label="anchor" href="#organise-experiments-in-notebooks"></a></h3>
<p>Jupyter notebooks are a useful tool for doing deep learning
experiments. You can very easily modify your code bit by bit, and
interactively look at the results. In addition you can explain why you
are doing things in markdown cells. - As a rule of thumb do one approach
or experiment in one notebook. - Give consistent and meaningful names to
notebooks, such as: <code>01-all-cities-simple-cnn.ipynb</code> - Add a
rationale on top and a conclusion on the bottom of each notebook</p>
<p><a href="https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1007007" class="external-link"><em>Ten
simple rules for writing and sharing computational analyses in Jupyter
Notebooks</em></a> provides further advice on how to maximise the
usefulness and reproducibility of experiments captured in a
notebook.</p>
</div>
<div class="section level3">
<h3 id="use-python-modules">2. Use Python modules<a class="anchor" aria-label="anchor" href="#use-python-modules"></a></h3>
<p>Code that is repeatedly used should live in a Python module and not
be copied to multiple notebooks. You can import functions and classes
from the module(s) in the notebooks. This way you can remove a lot of
code definition from your notebooks and have a focus on the actual
experiment.</p>
</div>
<div class="section level3">
<h3 id="keep-track-of-your-results-in-a-central-place">3. Keep track of your results in a central place<a class="anchor" aria-label="anchor" href="#keep-track-of-your-results-in-a-central-place"></a></h3>
<p>Always evaluate your experiments in the same way, on the exact same
test set. Document the results of your experiments in a consistent and
meaningful way. You can use a simple spreadsheet such as this:</p>
<table class="table"><colgroup><col width="21%"><col width="38%"><col width="5%"><col width="13%"><col width="13%"><col width="8%"></colgroup><thead><tr class="header"><th>MODEL NAME</th>
<th>MODEL DESCRIPTION</th>
<th>RMSE</th>
<th>TESTSET NAME</th>
<th>GITHUB COMMIT</th>
<th>COMMENTS</th>
</tr></thead><tbody><tr class="odd"><td>weather_prediction_v1.0</td>
<td>Basel features only, 10 years. nn: 100-50</td>
<td>3.21</td>
<td>10_years_v1.0</td>
<td>ed28d85</td>
<td></td>
</tr><tr class="even"><td>weather_prediction_v1.1</td>
<td>all features, 10 years. nn: 100-50</td>
<td>3.35</td>
<td>10_years_v1.0</td>
<td>4427b78</td>
<td></td>
</tr></tbody></table><p>You could also use a tool such as <a href="https://wandb.ai/site" class="external-link">Weights and Biases</a> for this.</p>
<div id="cookiecutter-data-science" class="callout">
<div class="callout-square">
<i class="callout-icon" data-feather="bell"></i>
</div>
<div id="cookiecutter-data-science" class="callout-inner">
<h3 class="callout-title">Cookiecutter data science<a class="anchor" aria-label="anchor" href="#cookiecutter-data-science"></a>
</h3>
<div class="callout-content">
<p>If you want to get more pointers for organising deep learning, or
data science projects in general, we recommend <a href="https://drivendata.github.io/cookiecutter-data-science/" class="external-link">Cookiecutter
data science</a>. It is a template for initiating an organized data
science project folder structure that you can adapt to your own
needs.</p>
</div>
</div>
</div>
</div>
</section><section id="next-steps"><h2 class="section-heading">Next steps<a class="anchor" aria-label="anchor" href="#next-steps"></a>
</h2>
<hr class="half-width"><p>You now understand the basic principles of deep learning and are able
to implement your own deep learning pipelines in Python. But there is
still so much to learn and do!</p>
<p>Here are some suggestions for next steps you can take in your
endeavor to become a deep learning expert:</p>
<ul><li>Learn more by going through a few of <a href="reference.html#external-references">the learning resources we have
compiled for you</a>
</li>
<li>Apply what you have learned to your own projects. Use the deep
learning workflow to structure your work. Start as simple as possible,
and incrementally increase the complexity of your approach.</li>
<li>Compete in a <a href="https://www.kaggle.com/competitions" class="external-link">Kaggle
competition</a> to practice what you have learned.</li>
<li>Get access to a GPU. Your deep learning experiments will progress
much quicker if you have to wait for your network to train in a few
seconds instead of hours (which is the order of magnitude of speedup you
can expect from training on a GPU instead of CPU). Tensorflow/Keras will
automatically detect and use a GPU if it is available on your system
without any code changes. A simple and quick way to get access to a GPU
is to use <a href="https://colab.google/" class="external-link">Google Colab</a>
</li>
</ul><div id="keypoints1" class="callout keypoints">
<div class="callout-square">
<i class="callout-icon" data-feather="key"></i>
</div>
<div class="callout-inner">
<h3 class="callout-title">Key Points<a class="anchor" aria-label="anchor" href="#keypoints1"></a>
</h3>
<div class="callout-content">
<ul><li>Although the data preparation and model architectures are somewhat
more complex, what we have learned in this course can directly be
applied to real-world problems</li>
<li>Use what you have learned in this course as a basis for your own
learning trajectory in the world of deep learning</li>
</ul></div>
</div>
</div>
<!--
Place links that you need to refer to multiple times across pages here. Delete
any links that you are not going to use.
-->
</section></div> <!-- / div.lesson-content -->
</main><!-- / main#main-content.main-content --><nav class="bottom-pagination mx-md-4" aria-label="Previous and Next Chapter"><div class="d-block d-sm-block d-md-none">
<a class="chapter-link" href="4-advanced-layer-types.html"><i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>Previous</a>
<a class="chapter-link float-end" href="index.html">Next<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i></a>
</div>
<!-- content for large screens -->
<div class="d-none d-sm-none d-md-block">
<a class="chapter-link" href="4-advanced-layer-types.html" rel="prev">
<i aria-hidden="true" class="small-arrow" data-feather="arrow-left"></i>
Previous: Advanced layer types
</a>
<a class="chapter-link float-end" href="index.html" rel="next">
Home
<i aria-hidden="true" class="small-arrow" data-feather="arrow-right"></i>
</a>
</div>
</nav></div> <!-- / div.primary-content.col-xs-12 -->
<!-- END: inst/pkgdown/templates/content-instructor.html-->
</div><!--/div.row-->
<footer class="row footer mx-md-3"><hr><div class="col-md-6">
<p>This lesson is subject to the <a href="CODE_OF_CONDUCT.html">Code of Conduct</a></p>
<p>
<a href="https://github.com/carpentries-incubator/deep-learning-intro/edit/main/episodes/5-outlook.Rmd" class="external-link">Edit on GitHub</a>
| <a href="https://github.com/carpentries-incubator/deep-learning-intro/blob/main/CONTRIBUTING.md" class="external-link">Contributing</a>
| <a href="https://github.com/carpentries-incubator/deep-learning-intro/" class="external-link">Source</a></p>
<p><a href="https://github.com/carpentries-incubator/deep-learning-intro/blob/main/CITATION.cff" class="external-link">Cite</a> | <a href="mailto:[email protected]">Contact</a> | <a href="https://carpentries.org/about/" class="external-link">About</a></p>
</div>
<div class="col-md-6">
<p>Materials licensed under <a href="LICENSE.html">CC-BY 4.0</a> by the authors</p>
<p>Template licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/" class="external-link">CC-BY 4.0</a> by <a href="https://carpentries.org/" class="external-link">The Carpentries</a></p>
<p>Built with <a href="https://github.com/carpentries/sandpaper/tree/0.16.4" class="external-link">sandpaper (0.16.4)</a>, <a href="https://github.com/carpentries/pegboard/tree/0.7.5" class="external-link">pegboard (0.7.5)</a>, and <a href="https://github.com/carpentries/varnish/tree/1.0.2" class="external-link">varnish (1.0.2)</a></p>
</div>
</footer></div> <!-- / div.container -->
<div id="to-top">
<a href="#top">
<i class="search-icon" data-feather="arrow-up" role="img" aria-label="Back To Top"></i><br><!-- <span class="d-none d-sm-none d-md-none d-lg-none d-xl-block">Back</span> To Top --><span class="d-none d-sm-none d-md-none d-lg-none d-xl-block">Back</span> To Top
</a>
</div>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "TrainingMaterial",
"@id": "https://carpentries-incubator.github.io/deep-learning-intro/5-outlook.html",
"inLanguage": "en",
"dct:conformsTo": "https://bioschemas.org/profiles/TrainingMaterial/1.0-RELEASE",
"description": "A Carpentries Lesson teaching foundational data and coding skills to researchers worldwide",
"keywords": "deep learning, keras, lesson, The Carpentries, neural networks",
"name": "Outlook",
"creativeWorkStatus": "active",
"url": "https://carpentries-incubator.github.io/deep-learning-intro/5-outlook.html",
"identifier": "https://carpentries-incubator.github.io/deep-learning-intro/5-outlook.html",
"dateCreated": "2020-10-17",
"dateModified": "2024-04-30",
"datePublished": "2024-04-30"
}
</script><script>
feather.replace();
</script><!-- Matomo
2022-11-07: we have gotten a notification that we have an overage for our
tracking and I'm pretty sure this has to do with Workbench usage.
Considering that I am not _currently_ using this tracking because I do not
yet know how to access the data, I am turning this off for now.
<script>
var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setDomains", ["*.preview.carpentries.org","*.datacarpentry.github.io","*.datacarpentry.org","*.librarycarpentry.github.io","*.librarycarpentry.org","*.swcarpentry.github.io", "*.carpentries.github.io"]]);
_paq.push(["setDoNotTrack", true]);
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://carpentries.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='https://cdn.matomo.cloud/carpentries.matomo.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
End Matomo Code --></body></html><!-- END: inst/pkgdown/templates/layout.html-->