-
Notifications
You must be signed in to change notification settings - Fork 1
/
add-new-modules.html
647 lines (460 loc) · 28.9 KB
/
add-new-modules.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
<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Add New Modules</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/theme.css " type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="_static/css/waveform-list.css" type="text/css" />
<!-- sphinx script_files -->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<!-- bundled in js (rollup iife) -->
<!-- <script src="_static/theme-vendors.js"></script> -->
<script src="_static/theme.js" defer></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
</head>
<body>
<div id="app">
<div class="theme-container" :class="pageClasses"><navbar @toggle-sidebar="toggleSidebar">
<router-link to="index.html" class="home-link">
<span class="site-name">omnizart</span>
</router-link>
<div class="links">
<navlinks class="can-hide">
<div class="nav-item">
<a href="index.html#sound-samples"
class="nav-link ">
Contents
</a>
</div>
<div class="nav-item">
<a href="index.html#sound-samples"
class="nav-link ">
Command Line Interface
</a>
</div>
<div class="nav-item">
<a href="index.html#sound-samples"
class="nav-link ">
API Reference
</a>
</div>
</navlinks>
</div>
</navbar>
<div class="sidebar-mask" @click="toggleSidebar(false)">
</div>
<sidebar @toggle-sidebar="toggleSidebar">
<navlinks>
<div class="nav-item">
<a href="index.html#sound-samples"
class="nav-link ">
Contents
</a>
</div>
<div class="nav-item">
<a href="index.html#sound-samples"
class="nav-link ">
Command Line Interface
</a>
</div>
<div class="nav-item">
<a href="index.html#sound-samples"
class="nav-link ">
API Reference
</a>
</div>
</navlinks><div id="searchbox" class="searchbox" role="search">
<div class="caption"><span class="caption-text">Quick search</span>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Search" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div><div class="sidebar-links" role="navigation" aria-label="main navigation">
<div class="sidebar-group">
<p class="caption">
<span class="caption-text"><a href="index.html#sound-samples">Contents</a></span>
</p>
<ul class="">
<li class="toctree-l1 ">
<a href="quick-start.html" class="reference internal ">Quick Start</a>
</li>
<li class="toctree-l1 ">
<a href="tutorial.html" class="reference internal ">Tutorial</a>
</li>
<li class="toctree-l1 ">
<a href="demo.html" class="reference internal ">Demonstration</a>
</li>
</ul>
</div>
<div class="sidebar-group">
<p class="caption">
<span class="caption-text"><a href="index.html#sound-samples">Command Line Interface</a></span>
</p>
<ul class="">
<li class="toctree-l1 ">
<a href="music/cli.html" class="reference internal ">omnizart music</a>
</li>
<li class="toctree-l1 ">
<a href="drum/cli.html" class="reference internal ">omnizart drum</a>
</li>
<li class="toctree-l1 ">
<a href="chord/cli.html" class="reference internal ">omnizart chord</a>
</li>
<li class="toctree-l1 ">
<a href="vocal/cli.html" class="reference internal ">omnizart vocal</a>
</li>
<li class="toctree-l1 ">
<a href="vocal-contour/cli.html" class="reference internal ">omnizart vocal-contour</a>
</li>
<li class="toctree-l1 ">
<a href="beat/cli.html" class="reference internal ">omnizart beat</a>
</li>
<li class="toctree-l1 ">
<a href="patch-cnn/cli.html" class="reference internal ">omnizart patch-cnn</a>
</li>
</ul>
</div>
<div class="sidebar-group">
<p class="caption">
<span class="caption-text"><a href="index.html#sound-samples">API Reference</a></span>
</p>
<ul class="">
<li class="toctree-l1 ">
<a href="music/api.html" class="reference internal ">Music Transcription</a>
</li>
<li class="toctree-l1 ">
<a href="drum/api.html" class="reference internal ">Drum Transcription</a>
</li>
<li class="toctree-l1 ">
<a href="chord/api.html" class="reference internal ">Chord Transcription</a>
</li>
<li class="toctree-l1 ">
<a href="vocal/api.html" class="reference internal ">Vocal Transcription</a>
</li>
<li class="toctree-l1 ">
<a href="vocal-contour/api.html" class="reference internal ">Vocal-Contour Transcription</a>
</li>
<li class="toctree-l1 ">
<a href="patch-cnn/api.html" class="reference internal ">Patch-CNN Transcription</a>
</li>
<li class="toctree-l1 ">
<a href="beat/api.html" class="reference internal ">Beat Transcription</a>
</li>
<li class="toctree-l1 ">
<a href="feature.html" class="reference internal ">Feature</a>
</li>
<li class="toctree-l1 ">
<a href="models.html" class="reference internal ">Models</a>
</li>
<li class="toctree-l1 ">
<a href="training.html" class="reference internal ">Training</a>
</li>
<li class="toctree-l1 ">
<a href="base.html" class="reference internal ">Base Classes</a>
</li>
<li class="toctree-l1 ">
<a href="constants.html" class="reference internal ">Constants</a>
</li>
<li class="toctree-l1 ">
<a href="utils.html" class="reference internal ">Utilities</a>
</li>
</ul>
</div>
</div>
</sidebar>
<page>
<div class="body-header" role="navigation" aria-label="navigation">
<ul class="breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Add New Modules</li>
</ul>
<ul class="page-nav">
</ul>
</div>
<hr>
<div class="content" role="main" v-pre>
<section id="add-new-modules">
<h1>Add New Modules<a class="headerlink" href="#add-new-modules" title="Permalink to this headline">¶</a></h1>
<p>This page describes how to add new modules into Omnizart project, adapt the original implementations
to omnizart’s architecture.</p>
<p>Before starting walking through the integration process, be sure you have already read the
<a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/CONTRIBUTING.md">CONTRIBUTING.md</a>,
and the <a class="reference external" href="https://drive.google.com/file/d/1IO1lh07nMvSi0X0nzRDT7kuE1f468Rl1/view?usp=sharing">slides of omnziart</a>
could also be helpful for your understanding of this project.
Additionally, there are few more things to be always kept in mind while developing omnizart.</p>
<section id="principles">
<h2>Principles<a class="headerlink" href="#principles" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p><strong>Find an existing module and start development</strong> - There are already several implemented modules
that are fully functional, and being great examples that give you hints on your way developing
new modules. Most of them are very similar of their overall architecture, but vary in detail.
Most the time, you could just copy and paste the small pieces to your module, and modify just a
small part of them to adapt to your task.</p></li>
<li><p><strong>Try not to make your own wheels</strong> - There have been many useful and validated functions that are
developed to deal with the daily works. They are already there to cover 90% of every details of a
module, thus new logics are in very small chances being needed.
Most of the time you need to implement the most would be the part of feature and label extraction,
which will be explained in the upcoming sections.</p></li>
<li><p><strong>Check with linters frequently</strong> - You should always do <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">lint</span></code> before you push to github,
checking that there aren’t any errors with the code format, or the build process would fail.</p></li>
<li><p><strong>Don’t permit linter errors easily</strong> - You may find some comments that permits the linter errors
while surfing the code. Those are quick solutions while in the early development of omnizart, which
saves lots of time fixing those lint errors. But it should not be the main concern now, as the
architecture is more stable and less error prone. You should follow every hints by the linters
and fix them before you file a pull request.</p></li>
</ul>
<hr class="docutils" />
<p>So now we are all set and ready to add a new module to omnizart. Here we will take the
<a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/pull/11">PR #11</a> as the example.</p>
</section>
<section id="setup">
<h2>Setup<a class="headerlink" href="#setup" title="Permalink to this headline">¶</a></h2>
<ol class="arabic simple">
<li><p><strong>IMPORTANT</strong> - Give your module a short, yet descriptive name. In the example, the name is
<code class="docutils literal notranslate"><span class="pre">PatchCNN</span></code> (camel-case), <code class="docutils literal notranslate"><span class="pre">patch_cnn</span></code> (snake-case), and <code class="docutils literal notranslate"><span class="pre">patch-cnn</span></code> (for CLI use).</p></li>
<li><p>Create a folder named after your module under <code class="docutils literal notranslate"><span class="pre">omnizart</span></code>. There should be at least two files:
<code class="docutils literal notranslate"><span class="pre">app.py</span></code> and <code class="docutils literal notranslate"><span class="pre">__init__.py</span></code>.</p></li>
</ol>
</section>
<section id="implement-feature-generation">
<h2>Implement Feature Generation<a class="headerlink" href="#implement-feature-generation" title="Permalink to this headline">¶</a></h2>
<p>The process unit should be <strong>a dataset</strong>, means the function accepts the path to the dataset itself, and will handle the rest
of the things like dataset type inferring, folder structure handling, file parsing, feature extraction, and output storage.</p>
<section id="commits">
<h3>Commits<a class="headerlink" href="#commits" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/pull/11/commits/3ff6c4abe5ab98242d33c146353b5282ce5f6b66">3ff6c4a</a>
- Builds the main structure of feature extraction.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/pull/11/commits/f3138eb4a0650c91692f70e09bab1578be11c132">f3138eb</a>
- Contains the patch of label extraction function.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/pull/11/commits/0190f1895027cf859647c2099d3c03a24f73246a">0190f18</a>
- Contains the patch of label extraction function.</p></li>
</ul>
</section>
<section id="critical-files-functions">
<h3>Critical Files/Functions<a class="headerlink" href="#critical-files-functions" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L106-L193">omnizart.patch_cnn.app.PatchCNNTranscription.generate_feature</a>
- The main function for managing the process of feature generation.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/feature/cfp.py#L355-L451">omnizart.feature.cfp.extract_patch_cfp</a>
- The function for feature extraction, which takes audio path as the input and outputs the required feature representations.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L278-L327">omnizart.patch_cnn.app.extract_label</a>
- The function for label extraction, generating the representation of ground-truth. Accepts the path to the ground-truth file, parses the contents
into intermediate format (see <a class="reference internal" href="base.html#omnizart.base.Label" title="omnizart.base.Label"><code class="xref py py-class docutils literal notranslate"><span class="pre">omnizart.base.Label</span></code></a>), and extracts necessary informations.</p>
<p>Normally, it should be defined in a separate file called <code class="docutils literal notranslate"><span class="pre">labels.py</span></code> under <em>omnizart/<module>/</em> when the extraction process contains lots of logics.
Since the label extraction in this example is relatively simple, it is okay to put it under <code class="docutils literal notranslate"><span class="pre">omnizart.patch_cnn.app</span></code>.
See the conventional case <a class="reference internal" href="drum/api.html#module-omnizart.drum.labels" title="omnizart.drum.labels"><code class="xref py py-class docutils literal notranslate"><span class="pre">omnizart.drum.labels</span></code></a>.</p>
</li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L336-L373">omnizart.patch_cnn._parallel_feature_extraction</a></p>
<ul class="simple">
<li><p>To boost the process of feature extraction, files are processed in parallel. You can use the function</p></li>
</ul>
<p><a class="reference internal" href="utils.html#omnizart.utils.parallel_generator" title="omnizart.utils.parallel_generator"><code class="xref py py-class docutils literal notranslate"><span class="pre">omnizart.utils.parallel_generator</span></code></a> to accelerate the process.</p>
</li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/setting_loaders.py#L330-L357">omnizart.setting_loaders.PatchCNNSettings</a>
- The data class that holds the necessary hyper parameters that will be used by different functions of this module. For feature extraction, the
parameters are registered under <code class="docutils literal notranslate"><span class="pre">PatchCNNSettings.feature</span></code> attribute.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/checkpoints/patch_cnn/patch_cnn_melody/configurations.yaml#L13-L53">omnizart/defatuls/patch_cnn.yaml</a>
- The configuration file of the module, records the values of hyper parameters and will be consumed by the data class (i.e. PatchCNNSettings).</p></li>
</ul>
</section>
<section id="overall-process-flow">
<h3>Overall Process Flow<a class="headerlink" href="#overall-process-flow" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li><dl class="simple">
<dt>Determine the dataset type from the given dataset path.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/music/app.py#L169-L179">music module</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Choose the corresponding dataset structure class.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L135">patch-cnn</a></p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/music/app.py#L182-L186">music module</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Parse audio/ground-truth file pairs.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L163-L167">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Make sure feature output path exists.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L169-L172">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Parallel generate feature and label representation.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L174-L188">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Write the settings to the output path, named as <em>.success.yaml</em>.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L190-L193">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
</ol>
</section>
</section>
<section id="implement-model-training">
<h2>Implement Model Training<a class="headerlink" href="#implement-model-training" title="Permalink to this headline">¶</a></h2>
<p>All the training should happen in the <code class="docutils literal notranslate"><span class="pre">.fit()</span></code> function to fine-tune the model. There is supposed no need to manually
write the training loop.</p>
<section id="id6">
<h3>Commits<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/pull/11/commits/2d6f74da88e52cef7ef6e96f3b93be97771bdf31">2d6f74d</a></p></li>
</ul>
</section>
<section id="id7">
<h3>Critical Files/Functions<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L195-L275">omnizart.patch_cnn.app.PatchCNNTranscription.train</a>
- The main function for managing the training flow.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/models/patch_cnn.py">omnizart.models.patch_cnn</a>
- Definition of the model. You can also customize the <code class="docutils literal notranslate"><span class="pre">train_step</span></code> function to do more sophisticated loss computation. See examples
in <a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/models/pyramid_net.py#L233-L284">vocal</a>
and <a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/models/chord_model.py#L547-L600">chord</a>
modules.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L376-L380">omnizart.patch_cnn.app.PatchCNNDatasetLoader</a>
- The dataset loader for feeding data to models. Dealing with listing files, iterating through all feature/label pairs,
indexing, and additionally augmenting, clipping, or transforming the feature/label on the fly.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/setting_loaders.py#L366-L386">omnizart.setting_loaders.PatchCNNSettings</a>
- The data class that holds the necessary hyper parameters that will be used by different functions of this module. For model training,
related hyper parameters are registered under <code class="docutils literal notranslate"><span class="pre">PatchCNNSettings.dataset</span></code>, <code class="docutils literal notranslate"><span class="pre">PatchCNNSettings.model</span></code>, and
<code class="docutils literal notranslate"><span class="pre">PatchCNNSettings.training</span></code> attributes.</p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/checkpoints/patch_cnn/patch_cnn_melody/configurations.yaml#L54-L75">omnizart/defatuls/patch_cnn.yaml (1)</a> /
<a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/checkpoints/patch_cnn/patch_cnn_melody/configurations.yaml#L88-L118">omnizart/defatuls/patch_cnn.yaml (2)</a>
- The configuration file of the module, records the values of hyper parameters and will be consumed by the data class (i.e. PatchCNNSettings).</p></li>
</ul>
</section>
<section id="id9">
<h3>Overall Process Flow<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
<ol class="arabic simple">
<li><dl class="simple">
<dt>Check whether there is an input model or not. If given input model path, this indicating the user wants to fine-tune on a previously trained model. The coressponding settings should also be updated.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L216-L219">patch-cnn</a></p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/drum/app.py#L167-L172">drum</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Decide the portion of training and validation set.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L221-L223">patch-cnn</a></p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/drum/app.py#L174-L176">drum</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Construct dataset loader instances for training and validation.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L225-L236">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Construct a fresh model if there is no input model.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L238-L240">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Compile the model with loss function</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L242-L244">patch-cnn</a></p></li>
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/master/omnizart/drum/app.py#L167-L172">music</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Resolve the output path of the model</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L246-L255">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Construct the callbacks for storing the checkpoints, early stopping the training, and others.</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L257-L262">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
<li><dl class="simple">
<dt>Start training</dt><dd><ul class="simple">
<li><p><a class="reference external" href="https://github.com/Music-and-Culture-Technology-Lab/omnizart/blob/273fc60fbc6e3728c07abf71e06cf8f092bfabeb/omnizart/patch_cnn/app.py#L264-L274">patch-cnn</a></p></li>
</ul>
</dd>
</dl>
</li>
</ol>
</section>
</section>
<section id="implement-transcription">
<h2>Implement Transcription<a class="headerlink" href="#implement-transcription" title="Permalink to this headline">¶</a></h2>
</section>
<section id="add-unit-tests">
<h2>Add Unit Tests<a class="headerlink" href="#add-unit-tests" title="Permalink to this headline">¶</a></h2>
</section>
<section id="commit-checkpoints">
<h2>Commit Checkpoints<a class="headerlink" href="#commit-checkpoints" title="Permalink to this headline">¶</a></h2>
</section>
<section id="implement-cli">
<h2>Implement CLI<a class="headerlink" href="#implement-cli" title="Permalink to this headline">¶</a></h2>
</section>
<section id="add-documentation">
<h2>Add Documentation<a class="headerlink" href="#add-documentation" title="Permalink to this headline">¶</a></h2>
</section>
<hr class="docutils" />
<section id="optional">
<h2>Optional<a class="headerlink" href="#optional" title="Permalink to this headline">¶</a></h2>
<p>This section holds the optional actions you can do, while it is not necessary to be done
during implementing a new module.</p>
<section id="add-new-supported-datasets">
<h3>Add new supported datasets<a class="headerlink" href="#add-new-supported-datasets" title="Permalink to this headline">¶</a></h3>
<p>If you want to add a new dataset that is currently not supported by <code class="docutils literal notranslate"><span class="pre">omnizart</span></code> (which is defined in
<a class="reference internal" href="constants.html#module-omnizart.constants.datasets" title="omnizart.constants.datasets"><code class="xref py py-class docutils literal notranslate"><span class="pre">omnizart.constants.datasets</span></code></a>), things should be noticed are explained in this section.</p>
<p>(To be continued…)</p>
</section>
</section>
</section>
</div>
<div class="page-nav">
<div class="inner"><ul class="page-nav">
</ul><div class="footer" role="contentinfo">
© Copyright 2020, MCTLab.
<br>
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 4.3.1 with <a href="https://github.com/schettino72/sphinx_press_theme">Press Theme</a> 0.8.0.
</div>
</div>
</div>
</page>
</div></div>
</body>
</html>