-
Notifications
You must be signed in to change notification settings - Fork 1
/
ini_layers.html
3199 lines (3075 loc) · 189 KB
/
ini_layers.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>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Network Layers — N2D2 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Targets (outputs & losses)" href="ini_target.html" />
<link rel="prev" title="Stimuli provider (Environment)" href="ini_environment.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home" alt="Documentation Home"> N2D2
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Introduction:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="intro.html">Presentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="about.html">About N2D2-IP</a></li>
<li class="toctree-l1"><a class="reference internal" href="simus.html">Performing simulations</a></li>
<li class="toctree-l1"><a class="reference internal" href="perfs_tools.html">Performance evaluation tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="tuto.html">Tutorials</a></li>
</ul>
<p class="caption"><span class="caption-text">ONNX Import:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="onnx_convert.html">Obtain ONNX models</a></li>
<li class="toctree-l1"><a class="reference internal" href="onnx_import.html">Import ONNX models</a></li>
<li class="toctree-l1"><a class="reference internal" href="onnx_transfer.html">Train from ONNX models</a></li>
</ul>
<p class="caption"><span class="caption-text">Quantization and Export:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="quant_post.html">Post-training quantization</a></li>
<li class="toctree-l1"><a class="reference internal" href="quant_qat.html">[NEW] Quantization-Aware Training</a></li>
<li class="toctree-l1"><a class="reference internal" href="export_CPP.html">Export: C++</a></li>
<li class="toctree-l1"><a class="reference internal" href="export_CPP_STM32.html">Export: C++/STM32</a></li>
<li class="toctree-l1"><a class="reference internal" href="export_TensorRT.html">Export: TensorRT</a></li>
<li class="toctree-l1"><a class="reference internal" href="export_DNeuro.html">Export: DNeuro</a></li>
<li class="toctree-l1"><a class="reference internal" href="export_ONNX.html">Export: ONNX</a></li>
<li class="toctree-l1"><a class="reference internal" href="export_legacy.html">Export: other / legacy</a></li>
</ul>
<p class="caption"><span class="caption-text">INI File Interface:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="ini_intro.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="ini_databases.html">Databases</a></li>
<li class="toctree-l1"><a class="reference internal" href="ini_data_analysis.html">Stimuli data analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="ini_environment.html">Stimuli provider (Environment)</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Network Layers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#layer-definition">Layer definition</a></li>
<li class="toctree-l2"><a class="reference internal" href="#weight-fillers">Weight fillers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#constantfiller">ConstantFiller</a></li>
<li class="toctree-l3"><a class="reference internal" href="#hefiller">HeFiller</a></li>
<li class="toctree-l3"><a class="reference internal" href="#normalfiller">NormalFiller</a></li>
<li class="toctree-l3"><a class="reference internal" href="#uniformfiller">UniformFiller</a></li>
<li class="toctree-l3"><a class="reference internal" href="#xavierfiller">XavierFiller</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#weight-solvers">Weight solvers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#sgdsolver-frame">SGDSolver_Frame</a></li>
<li class="toctree-l3"><a class="reference internal" href="#sgdsolver-frame-cuda">SGDSolver_Frame_CUDA</a></li>
<li class="toctree-l3"><a class="reference internal" href="#adamsolver-frame">AdamSolver_Frame</a></li>
<li class="toctree-l3"><a class="reference internal" href="#adamsolver-frame-cuda">AdamSolver_Frame_CUDA</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#activation-functions">Activation functions</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#logistic">Logistic</a></li>
<li class="toctree-l3"><a class="reference internal" href="#logisticwithloss">LogisticWithLoss</a></li>
<li class="toctree-l3"><a class="reference internal" href="#rectifier">Rectifier</a></li>
<li class="toctree-l3"><a class="reference internal" href="#saturation">Saturation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#softplus">Softplus</a></li>
<li class="toctree-l3"><a class="reference internal" href="#tanh">Tanh</a></li>
<li class="toctree-l3"><a class="reference internal" href="#tanhlecun">TanhLeCun</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#anchor">Anchor</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#configuration-parameters-frame-models">Configuration parameters (<em>Frame</em> models)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#outputs-remapping">Outputs remapping</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#batchnorm">BatchNorm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id6">Configuration parameters (<em>Frame</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#conv">Conv</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id7">Configuration parameters (<em>Frame</em> models)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuration-parameters-spike-models">Configuration parameters (<em>Spike</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#deconv">Deconv</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id8">Configuration parameters (<em>Frame</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#dropout">Dropout</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id10">Configuration parameters (<em>Frame</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#elemwise">ElemWise</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#sum-operation">Sum operation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#abssum-operation">AbsSum operation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#euclideansum-operation">EuclideanSum operation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#prod-operation">Prod operation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#max-operation">Max operation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#examples">Examples</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#fmp">FMP</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id12">Configuration parameters (<em>Frame</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#fc">Fc</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id13">Configuration parameters (<em>Frame</em> models)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id14">Configuration parameters (<em>Spike</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#lrn">LRN</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id15">Configuration parameters (<em>Frame</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#lstm">LSTM</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#global-layer-parameters-frame-cuda-models">Global layer parameters (<em>Frame_CUDA</em> models)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#configuration-parameters-frame-cuda-models">Configuration parameters (<em>Frame_CUDA</em> models)</a></li>
<li class="toctree-l3"><a class="reference internal" href="#current-restrictions">Current restrictions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#further-development-requirements">Further development requirements</a></li>
<li class="toctree-l3"><a class="reference internal" href="#development-guidance">Development guidance</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#normalize">Normalize</a></li>
<li class="toctree-l2"><a class="reference internal" href="#padding">Padding</a></li>
<li class="toctree-l2"><a class="reference internal" href="#pool">Pool</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#maxout-example">Maxout example</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id17">Configuration parameters (<em>Spike</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#rbf">Rbf</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id18">Configuration parameters (<em>Frame</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#resize">Resize</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#configuration-parameters">Configuration parameters</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#softmax">Softmax</a></li>
<li class="toctree-l2"><a class="reference internal" href="#transformation">Transformation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#threshold">Threshold</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#id19">Configuration parameters (<em>Frame</em> models)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#unpool">Unpool</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ini_target.html">Targets (outputs & losses)</a></li>
<li class="toctree-l1"><a class="reference internal" href="adversarial.html">Adversarial module</a></li>
</ul>
<p class="caption"><span class="caption-text">Python API:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="containers.html">Containers</a></li>
<li class="toctree-l1"><a class="reference internal" href="cells.html">Cells</a></li>
<li class="toctree-l1"><a class="reference internal" href="databases.html">Databases</a></li>
<li class="toctree-l1"><a class="reference internal" href="stimuliprovider.html">StimuliProvider</a></li>
<li class="toctree-l1"><a class="reference internal" href="deepnet.html">DeepNet</a></li>
</ul>
<p class="caption"><span class="caption-text">C++ API / Developer:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="dev_intro.html">Introduction</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">N2D2</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> »</li>
<li>Network Layers</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/ini_layers.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="network-layers">
<h1>Network Layers<a class="headerlink" href="#network-layers" title="Permalink to this headline">¶</a></h1>
<div class="section" id="layer-definition">
<h2>Layer definition<a class="headerlink" href="#layer-definition" title="Permalink to this headline">¶</a></h2>
<p>Common set of parameters for any kind of layer.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 30%" />
<col style="width: 70%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Input</span></code></p></td>
<td><p>Name of the section(s) for the input layer(s). Comma separated</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">Type</span></code></p></td>
<td><p>Type of the layer. Can be any of the type described below</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Model</span></code> [<code class="docutils literal notranslate"><span class="pre">DefaultModel</span></code>]</p></td>
<td><p>Layer model to use</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">DataType</span></code> [<code class="docutils literal notranslate"><span class="pre">DefaultDataType</span></code>]</p></td>
<td><p>Layer data type to use. Please note that some layers may not support every data type.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">ConfigSection</span></code> []</p></td>
<td><p>Name of the configuration section for layer</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="weight-fillers">
<h2>Weight fillers<a class="headerlink" href="#weight-fillers" title="Permalink to this headline">¶</a></h2>
<p>Fillers to initialize weights and biases in the different type of layer.</p>
<p>Usage example:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[conv1]</span>
<span class="na">...</span>
<span class="na">WeightsFiller</span><span class="o">=</span><span class="s">NormalFiller</span>
<span class="na">WeightsFiller.Mean</span><span class="o">=</span><span class="s">0.0</span>
<span class="na">WeightsFiller.StdDev</span><span class="o">=</span><span class="s">0.05</span>
<span class="na">...</span>
</pre></div>
</div>
<p>The initial weights distribution for each layer can be checked in the
<em>weights_init</em> folder, with an example shown in figure
[fig:weightsInitDistrib].</p>
<div class="figure align-default" id="id20">
<img alt="Initial weights distribution of a layer using a normal distribution (``NormalFiller``) with a 0 mean and a 0.05 standard deviation." src="_images/weightsInitDistrib.png" />
<p class="caption"><span class="caption-text">Initial weights distribution of a layer using a normal distribution
(<code class="docutils literal notranslate"><span class="pre">NormalFiller</span></code>) with a 0 mean and a 0.05 standard deviation.</span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
</div>
<div class="section" id="constantfiller">
<h3>ConstantFiller<a class="headerlink" href="#constantfiller" title="Permalink to this headline">¶</a></h3>
<p>Fill with a constant value.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 53%" />
<col style="width: 47%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.Value</span></code></p></td>
<td><p>Value for the filling</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="hefiller">
<h3>HeFiller<a class="headerlink" href="#hefiller" title="Permalink to this headline">¶</a></h3>
<p>Fill with an normal distribution with normalized variance taking into
account the rectifier nonlinearity <a class="bibtex reference internal" href="tuto.html#he2015" id="id1">[HZRS15]</a>. This
filler is sometimes referred as MSRA filler.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 43%" />
<col style="width: 57%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.VarianceNorm</span></code> [<code class="docutils literal notranslate"><span class="pre">FanIn</span></code>]</p></td>
<td><p>Normalization, can be <code class="docutils literal notranslate"><span class="pre">FanIn</span></code>, <code class="docutils literal notranslate"><span class="pre">Average</span></code> or <code class="docutils literal notranslate"><span class="pre">FanOut</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.Scaling</span></code> [1.0]</p></td>
<td><p>Scaling factor</p></td>
</tr>
</tbody>
</table>
<p>Use a normal distribution with standard deviation
<span class="math notranslate nohighlight">\(\sqrt{\frac{2.0}{n}}\)</span>.</p>
<ul class="simple">
<li><p><span class="math notranslate nohighlight">\(n\)</span> = <span class="math notranslate nohighlight">\(fan\text{-}in\)</span> with <code class="docutils literal notranslate"><span class="pre">FanIn</span></code>, resulting in
<span class="math notranslate nohighlight">\(Var(W)=\frac{2}{fan\text{-}in}\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(n\)</span> = <span class="math notranslate nohighlight">\(\frac{(fan\text{-}in + fan\text{-}out)}{2}\)</span>
with <code class="docutils literal notranslate"><span class="pre">Average</span></code>, resulting in
<span class="math notranslate nohighlight">\(Var(W)=\frac{4}{fan\text{-}in + fan\text{-}out}\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(n\)</span> = <span class="math notranslate nohighlight">\(fan\text{-}out\)</span> with <code class="docutils literal notranslate"><span class="pre">FanOut</span></code>, resulting in
<span class="math notranslate nohighlight">\(Var(W)=\frac{2}{fan\text{-}out}\)</span></p></li>
</ul>
</div>
<div class="section" id="normalfiller">
<h3>NormalFiller<a class="headerlink" href="#normalfiller" title="Permalink to this headline">¶</a></h3>
<p>Fill with a normal distribution.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 45%" />
<col style="width: 55%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.Mean</span></code> [0.0]</p></td>
<td><p>Mean value of the distribution</p></td>
</tr>
<tr class="row-odd"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.StdDev</span></code> [1.0]</p></td>
<td><p>Standard deviation of the distribution</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="uniformfiller">
<h3>UniformFiller<a class="headerlink" href="#uniformfiller" title="Permalink to this headline">¶</a></h3>
<p>Fill with an uniform distribution.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 68%" />
<col style="width: 32%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.Min</span></code> [0.0]</p></td>
<td><p>Min. value</p></td>
</tr>
<tr class="row-odd"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.Max</span></code> [1.0]</p></td>
<td><p>Max. value</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="xavierfiller">
<h3>XavierFiller<a class="headerlink" href="#xavierfiller" title="Permalink to this headline">¶</a></h3>
<p>Fill with an uniform distribution with normalized variance
<a class="bibtex reference internal" href="tuto.html#glorot2010" id="id2">[GB10]</a>.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 44%" />
<col style="width: 56%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.VarianceNorm</span></code> [<code class="docutils literal notranslate"><span class="pre">FanIn</span></code>]</p></td>
<td><p>Normalization, can be <code class="docutils literal notranslate"><span class="pre">FanIn</span></code>, <code class="docutils literal notranslate"><span class="pre">Average</span></code> or <code class="docutils literal notranslate"><span class="pre">FanOut</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.Distribution</span></code> [<code class="docutils literal notranslate"><span class="pre">Uniform</span></code>]</p></td>
<td><p>Distribution, can be <code class="docutils literal notranslate"><span class="pre">Uniform</span></code> or <code class="docutils literal notranslate"><span class="pre">Normal</span></code></p></td>
</tr>
<tr class="row-even"><td><p><em>FillerName</em><code class="docutils literal notranslate"><span class="pre">.Scaling</span></code> [1.0]</p></td>
<td><p>Scaling factor</p></td>
</tr>
</tbody>
</table>
<p>Use an uniform distribution with interval <span class="math notranslate nohighlight">\([-scale,scale]\)</span>, with
<span class="math notranslate nohighlight">\(scale = \sqrt{\frac{3.0}{n}}\)</span>.</p>
<ul class="simple">
<li><p><span class="math notranslate nohighlight">\(n\)</span> = <span class="math notranslate nohighlight">\(fan\text{-}in\)</span> with <code class="docutils literal notranslate"><span class="pre">FanIn</span></code>, resulting in
<span class="math notranslate nohighlight">\(Var(W)=\frac{1}{fan\text{-}in}\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(n\)</span> = <span class="math notranslate nohighlight">\(\frac{(fan\text{-}in + fan\text{-}out)}{2}\)</span>
with <code class="docutils literal notranslate"><span class="pre">Average</span></code>, resulting in
<span class="math notranslate nohighlight">\(Var(W)=\frac{2}{fan\text{-}in + fan\text{-}out}\)</span></p></li>
<li><p><span class="math notranslate nohighlight">\(n\)</span> = <span class="math notranslate nohighlight">\(fan\text{-}out\)</span> with <code class="docutils literal notranslate"><span class="pre">FanOut</span></code>, resulting in
<span class="math notranslate nohighlight">\(Var(W)=\frac{1}{fan\text{-}out}\)</span></p></li>
</ul>
</div>
</div>
<div class="section" id="weight-solvers">
<h2>Weight solvers<a class="headerlink" href="#weight-solvers" title="Permalink to this headline">¶</a></h2>
<div class="section" id="sgdsolver-frame">
<h3>SGDSolver_Frame<a class="headerlink" href="#sgdsolver-frame" title="Permalink to this headline">¶</a></h3>
<p>SGD Solver for <code class="docutils literal notranslate"><span class="pre">Frame</span></code> models.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 30%" />
<col style="width: 70%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code> [0.01]</p></td>
<td><p>Learning rate</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Momentum</span></code> [0.0]</p></td>
<td><p>Momentum</p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Decay</span></code> [0.0]</p></td>
<td><p>Decay</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRatePolicy</span></code> [<code class="docutils literal notranslate"><span class="pre">None</span></code>]</p></td>
<td><p>Learning rate decay policy. Can be any of <code class="docutils literal notranslate"><span class="pre">None</span></code>, <code class="docutils literal notranslate"><span class="pre">StepDecay</span></code>, <code class="docutils literal notranslate"><span class="pre">ExponentialDecay</span></code>, <code class="docutils literal notranslate"><span class="pre">InvTDecay</span></code>, <code class="docutils literal notranslate"><span class="pre">PolyDecay</span></code></p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateStepSize</span></code> [1]</p></td>
<td><p>Learning rate step size (in number of stimuli)</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateDecay</span></code> [0.1]</p></td>
<td><p>Learning rate decay</p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Clamping</span></code> [0]</p></td>
<td><p>If true, clamp the weights and bias between -1 and 1</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Power</span></code> [0.0]</p></td>
<td><p>Polynomial learning rule power parameter</p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.MaxIterations</span></code> [0.0]</p></td>
<td><p>Polynomial learning rule maximum number of iterations</p></td>
</tr>
</tbody>
</table>
<p>The learning rate decay policies are the following:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">StepDecay</span></code>: every <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateStepSize</span></code> stimuli,
the learning rate is reduced by a factor
<em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateDecay</span></code>;</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ExponentialDecay</span></code>: the learning rate is
<span class="math notranslate nohighlight">\(\alpha = \alpha_{0}\exp(-k t)\)</span>, with <span class="math notranslate nohighlight">\(\alpha_{0}\)</span> the
initial learning rate <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code>, <span class="math notranslate nohighlight">\(k\)</span> the
rate decay <em>SolverName</em> <code class="docutils literal notranslate"><span class="pre">.LearningRateDecay</span></code> and <span class="math notranslate nohighlight">\(t\)</span> the step
number (one step every <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateStepSize</span></code>
stimuli);</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">InvTDecay</span></code>: the learning rate is
<span class="math notranslate nohighlight">\(\alpha = \alpha_{0} / (1 + k t)\)</span>, with <span class="math notranslate nohighlight">\(\alpha_{0}\)</span> the
initial learning rate <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code>, <span class="math notranslate nohighlight">\(k\)</span> the
rate decay <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateDecay</span></code> and <span class="math notranslate nohighlight">\(t\)</span> the step
number (one step every <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateStepSize</span></code>
stimuli).</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">InvDecay</span></code>: the learning rate is
<span class="math notranslate nohighlight">\(\alpha = \alpha_{0} * (1 + k t)^{-n}\)</span>, with <span class="math notranslate nohighlight">\(\alpha_{0}\)</span>
the initial learning rate <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code>, <span class="math notranslate nohighlight">\(k\)</span>
the rate decay <em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateDecay</span></code>, <span class="math notranslate nohighlight">\(t\)</span> the
current iteration and <span class="math notranslate nohighlight">\(n\)</span> the power parameter
<em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Power</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">PolyDecay</span></code>: the learning rate is
<span class="math notranslate nohighlight">\(\alpha = \alpha_{0} * (1 - \frac{k}{t})^n\)</span>, with
<span class="math notranslate nohighlight">\(\alpha_{0}\)</span> the initial learning rate
<em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code>, <span class="math notranslate nohighlight">\(k\)</span> the current iteration,
<span class="math notranslate nohighlight">\(t\)</span> the maximum number of iteration
<em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.MaxIterations</span></code> and <span class="math notranslate nohighlight">\(n\)</span> the power parameter
<em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Power</span></code></p></li>
</ul>
</div>
<div class="section" id="sgdsolver-frame-cuda">
<h3>SGDSolver_Frame_CUDA<a class="headerlink" href="#sgdsolver-frame-cuda" title="Permalink to this headline">¶</a></h3>
<p>SGD Solver for <code class="docutils literal notranslate"><span class="pre">Frame_CUDA</span></code> models.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 33%" />
<col style="width: 67%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code> [0.01]</p></td>
<td><p>Learning rate</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Momentum</span></code> [0.0]</p></td>
<td><p>Momentum</p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Decay</span></code> [0.0]</p></td>
<td><p>Decay</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRatePolicy</span></code> [<code class="docutils literal notranslate"><span class="pre">None</span></code>]</p></td>
<td><p>Learning rate decay policy. Can be any of <code class="docutils literal notranslate"><span class="pre">None</span></code>, <code class="docutils literal notranslate"><span class="pre">StepDecay</span></code>, <code class="docutils literal notranslate"><span class="pre">ExponentialDecay</span></code>, <code class="docutils literal notranslate"><span class="pre">InvTDecay</span></code></p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateStepSize</span></code> [1]</p></td>
<td><p>Learning rate step size (in number of stimuli)</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRateDecay</span></code> [0.1]</p></td>
<td><p>Learning rate decay</p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Clamping</span></code> [0]</p></td>
<td><p>If true, clamp the weights and bias between -1 and 1</p></td>
</tr>
</tbody>
</table>
<p>The learning rate decay policies are identical to the ones in the
<code class="docutils literal notranslate"><span class="pre">SGDSolver_Frame</span></code> solver.</p>
</div>
<div class="section" id="adamsolver-frame">
<h3>AdamSolver_Frame<a class="headerlink" href="#adamsolver-frame" title="Permalink to this headline">¶</a></h3>
<p>Adam Solver for <code class="docutils literal notranslate"><span class="pre">Frame</span></code> models <a class="bibtex reference internal" href="tuto.html#kingmab14" id="id3">[KB14]</a>.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 38%" />
<col style="width: 62%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code> [0.001]</p></td>
<td><p>Learning rate (stepsize)</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Beta1</span></code> [0.9]</p></td>
<td><p>Exponential decay rate of these moving average of the first moment</p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Beta2</span></code> [0.999]</p></td>
<td><p>Exponential decay rate of these moving average of the second moment</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Epsilon</span></code> [1.0e-8]</p></td>
<td><p>Epsilon</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="adamsolver-frame-cuda">
<h3>AdamSolver_Frame_CUDA<a class="headerlink" href="#adamsolver-frame-cuda" title="Permalink to this headline">¶</a></h3>
<p>Adam Solver for <code class="docutils literal notranslate"><span class="pre">Frame_CUDA</span></code> models <a class="bibtex reference internal" href="tuto.html#kingmab14" id="id4">[KB14]</a>.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 38%" />
<col style="width: 62%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.LearningRate</span></code> [0.001]</p></td>
<td><p>Learning rate (stepsize)</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Beta1</span></code> [0.9]</p></td>
<td><p>Exponential decay rate of these moving average of the first moment</p></td>
</tr>
<tr class="row-even"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Beta2</span></code> [0.999]</p></td>
<td><p>Exponential decay rate of these moving average of the second moment</p></td>
</tr>
<tr class="row-odd"><td><p><em>SolverName</em><code class="docutils literal notranslate"><span class="pre">.Epsilon</span></code> [1.0e-8]</p></td>
<td><p>Epsilon</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="activation-functions">
<h2>Activation functions<a class="headerlink" href="#activation-functions" title="Permalink to this headline">¶</a></h2>
<p>Activation function to be used at the output of layers.</p>
<p>Usage example:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[conv1]</span>
<span class="na">...</span>
<span class="na">ActivationFunction</span><span class="o">=</span><span class="s">Rectifier</span>
<span class="na">ActivationFunction.LeakSlope</span><span class="o">=</span><span class="s">0.01</span>
<span class="na">ActivationFunction.Clipping</span><span class="o">=</span><span class="s">20</span>
<span class="na">...</span>
</pre></div>
</div>
<div class="section" id="logistic">
<h3>Logistic<a class="headerlink" href="#logistic" title="Permalink to this headline">¶</a></h3>
<p>Logistic activation function.</p>
</div>
<div class="section" id="logisticwithloss">
<h3>LogisticWithLoss<a class="headerlink" href="#logisticwithloss" title="Permalink to this headline">¶</a></h3>
<p>Logistic with loss activation function.</p>
</div>
<div class="section" id="rectifier">
<h3>Rectifier<a class="headerlink" href="#rectifier" title="Permalink to this headline">¶</a></h3>
<p>Rectifier or ReLU activation function.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 52%" />
<col style="width: 48%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">ActivationFunction.LeakSlope</span></code> [0.0]</p></td>
<td><p>Leak slope for negative inputs</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">ActivationFunction.Clipping</span></code> [0.0]</p></td>
<td><p>Clipping value for positive outputs</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="saturation">
<h3>Saturation<a class="headerlink" href="#saturation" title="Permalink to this headline">¶</a></h3>
<p>Saturation activation function.</p>
</div>
<div class="section" id="softplus">
<h3>Softplus<a class="headerlink" href="#softplus" title="Permalink to this headline">¶</a></h3>
<p>Softplus activation function.</p>
</div>
<div class="section" id="tanh">
<h3>Tanh<a class="headerlink" href="#tanh" title="Permalink to this headline">¶</a></h3>
<p>Tanh activation function.</p>
<p>Computes <span class="math notranslate nohighlight">\(y = tanh(\alpha x)\)</span>.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 58%" />
<col style="width: 42%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">ActivationFunction.Alpha</span></code> [1.0]</p></td>
<td><p><span class="math notranslate nohighlight">\(\alpha\)</span> parameter</p></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="tanhlecun">
<h3>TanhLeCun<a class="headerlink" href="#tanhlecun" title="Permalink to this headline">¶</a></h3>
<p>Tanh activation function with an <span class="math notranslate nohighlight">\(\alpha\)</span> parameter of
<span class="math notranslate nohighlight">\(1.7159 \times (2.0/3.0)\)</span>.</p>
</div>
</div>
<div class="section" id="anchor">
<h2>Anchor<a class="headerlink" href="#anchor" title="Permalink to this headline">¶</a></h2>
<p>Anchor layer for Faster R-CNN or Single Shot Detector.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 27%" />
<col style="width: 73%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Input</span></code></p></td>
<td><p>This layer takes one or two inputs. The total number of input channels must be <code class="docutils literal notranslate"><span class="pre">ScoresCls</span></code> + 4, with <code class="docutils literal notranslate"><span class="pre">ScoresCls</span></code> being equal to 1 or 2.</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">Anchor[*]</span></code></p></td>
<td><p>Anchors definition. For each anchor, there must be two space-separated values: the root area and the aspect ratio.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">ScoresCls</span></code></p></td>
<td><p>Number of classes per anchor. Must be 1 (if the scores input uses logistic regression) or 2 (if the scores input is a two-class softmax layer)</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">FeatureMapWidth</span></code> [<code class="docutils literal notranslate"><span class="pre">StimuliProvider.Width</span></code>]</p></td>
<td><p>Reference width use to scale anchors coordinate.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">FeatureMapHeight</span></code> [<code class="docutils literal notranslate"><span class="pre">StimuliProvider.Height</span></code>]</p></td>
<td><p>Reference height use to scale anchors coordinate.</p></td>
</tr>
</tbody>
</table>
<div class="section" id="configuration-parameters-frame-models">
<h3>Configuration parameters (<em>Frame</em> models)<a class="headerlink" href="#configuration-parameters-frame-models" title="Permalink to this headline">¶</a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 18%" />
<col style="width: 9%" />
<col style="width: 73%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Model(s)</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">PositiveIoU</span></code> [0.7]</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Assign a positive label for anchors whose IoU overlap is higher than <code class="docutils literal notranslate"><span class="pre">PositiveIoU</span></code> with any ground-truth box</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">NegativeIoU</span></code> [0.3]</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Assign a negative label for non-positive anchors whose IoU overlap is lower than <code class="docutils literal notranslate"><span class="pre">NegativeIoU</span></code> for all ground-truth boxes</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">LossLambda</span></code> [10.0]</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Balancing parameter <span class="math notranslate nohighlight">\(\lambda\)</span></p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">LossPositiveSample</span></code> [128]</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Number of random positive samples for the loss computation</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">LossNegativeSample</span></code> [128]</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Number of random negative samples for the loss computation</p></td>
</tr>
</tbody>
</table>
<p>Usage example:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="c1">; RPN network: cls layer</span>
<span class="k">[scores]</span>
<span class="na">Input</span><span class="o">=</span><span class="s">...</span>
<span class="na">Type</span><span class="o">=</span><span class="s">Conv</span>
<span class="na">KernelWidth</span><span class="o">=</span><span class="s">1</span>
<span class="na">KernelHeight</span><span class="o">=</span><span class="s">1</span>
<span class="c1">; 18 channels for 9 anchors</span>
<span class="na">NbOutputs</span><span class="o">=</span><span class="s">18</span>
<span class="na">...</span>
<span class="k">[scores.softmax]</span>
<span class="na">Input</span><span class="o">=</span><span class="s">scores</span>
<span class="na">Type</span><span class="o">=</span><span class="s">Softmax</span>
<span class="na">NbOutputs</span><span class="o">=</span><span class="s">[scores]NbOutputs</span>
<span class="na">WithLoss</span><span class="o">=</span><span class="s">1</span>
<span class="c1">; RPN network: coordinates layer</span>
<span class="k">[coordinates]</span>
<span class="na">Input</span><span class="o">=</span><span class="s">...</span>
<span class="na">Type</span><span class="o">=</span><span class="s">Conv</span>
<span class="na">KernelWidth</span><span class="o">=</span><span class="s">1</span>
<span class="na">KernelHeight</span><span class="o">=</span><span class="s">1</span>
<span class="c1">; 36 channels for 4 coordinates x 9 anchors</span>
<span class="na">NbOutputs</span><span class="o">=</span><span class="s">36</span>
<span class="na">...</span>
<span class="c1">; RPN network: anchors</span>
<span class="k">[anchors]</span>
<span class="na">Input</span><span class="o">=</span><span class="s">scores.softmax,coordinates</span>
<span class="na">Type</span><span class="o">=</span><span class="s">Anchor</span>
<span class="na">ScoresCls</span><span class="o">=</span><span class="s">2 ; using a two-class softmax for the scores</span>
<span class="na">Anchor[0]</span><span class="o">=</span><span class="s">32 1.0</span>
<span class="na">Anchor[1]</span><span class="o">=</span><span class="s">48 1.0</span>
<span class="na">Anchor[2]</span><span class="o">=</span><span class="s">64 1.0</span>
<span class="na">Anchor[3]</span><span class="o">=</span><span class="s">80 1.0</span>
<span class="na">Anchor[4]</span><span class="o">=</span><span class="s">96 1.0</span>
<span class="na">Anchor[5]</span><span class="o">=</span><span class="s">112 1.0</span>
<span class="na">Anchor[6]</span><span class="o">=</span><span class="s">128 1.0</span>
<span class="na">Anchor[7]</span><span class="o">=</span><span class="s">144 1.0</span>
<span class="na">Anchor[8]</span><span class="o">=</span><span class="s">160 1.0</span>
<span class="na">ConfigSection</span><span class="o">=</span><span class="s">anchors.config</span>
<span class="k">[anchors.config]</span>
<span class="na">PositiveIoU</span><span class="o">=</span><span class="s">0.7</span>
<span class="na">NegativeIoU</span><span class="o">=</span><span class="s">0.3</span>
<span class="na">LossLambda</span><span class="o">=</span><span class="s">1.0</span>
</pre></div>
</div>
</div>
<div class="section" id="outputs-remapping">
<h3>Outputs remapping<a class="headerlink" href="#outputs-remapping" title="Permalink to this headline">¶</a></h3>
<p>Outputs remapping allows to convert <em>scores</em> and <em>coordinates</em> output
feature maps layout from another ordering that the one used in the N2D2
<code class="docutils literal notranslate"><span class="pre">Anchor</span></code> layer, during weights import/export.</p>
<p>For example, lets consider that the imported weights corresponds to the
following output feature maps ordering:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">0</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">y</span>
<span class="mi">1</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">x</span>
<span class="mi">2</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">h</span>
<span class="mi">3</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">w</span>
<span class="mi">4</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">y</span>
<span class="mi">5</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">x</span>
<span class="mi">6</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">h</span>
<span class="mi">7</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">w</span>
<span class="mi">8</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">y</span>
<span class="mi">9</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">x</span>
<span class="mi">10</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">h</span>
<span class="mi">11</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">w</span>
</pre></div>
</div>
<p>The output feature maps ordering required by the <code class="docutils literal notranslate"><span class="pre">Anchor</span></code> layer is:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="mi">0</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">x</span>
<span class="mi">1</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">x</span>
<span class="mi">2</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">x</span>
<span class="mi">3</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">y</span>
<span class="mi">4</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">y</span>
<span class="mi">5</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">y</span>
<span class="mi">6</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">w</span>
<span class="mi">7</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">w</span>
<span class="mi">8</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">w</span>
<span class="mi">9</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">h</span>
<span class="mi">10</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">h</span>
<span class="mi">11</span> <span class="n">anchor</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">h</span>
</pre></div>
</div>
<p>The feature maps ordering can be changed during weights import/export:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="c1">; RPN network: coordinates layer</span>
<span class="k">[coordinates]</span>
<span class="na">Input</span><span class="o">=</span><span class="s">...</span>
<span class="na">Type</span><span class="o">=</span><span class="s">Conv</span>
<span class="na">KernelWidth</span><span class="o">=</span><span class="s">1</span>
<span class="na">KernelHeight</span><span class="o">=</span><span class="s">1</span>
<span class="c1">; 36 channels for 4 coordinates x 9 anchors</span>
<span class="na">NbOutputs</span><span class="o">=</span><span class="s">36</span>
<span class="na">...</span>
<span class="na">ConfigSection</span><span class="o">=</span><span class="s">coordinates.config</span>
<span class="k">[coordinates.config]</span>
<span class="na">WeightsExportFormat</span><span class="o">=</span><span class="s">HWCO ; Weights format used by TensorFlow</span>
<span class="na">OutputsRemap</span><span class="o">=</span><span class="s">1:4,0:4,3:4,2:4</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="batchnorm">
<h2>BatchNorm<a class="headerlink" href="#batchnorm" title="Permalink to this headline">¶</a></h2>
<p>Batch Normalization layer <a class="bibtex reference internal" href="tuto.html#ioffe2015" id="id5">[IS15]</a>.</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 19%" />
<col style="width: 81%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">NbOutputs</span></code></p></td>
<td><p>Number of output neurons</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">ActivationFunction</span></code> []</p></td>
<td><p>Activation function. Can be any of <code class="docutils literal notranslate"><span class="pre">Logistic</span></code>, <code class="docutils literal notranslate"><span class="pre">LogisticWithLoss</span></code>, <code class="docutils literal notranslate"><span class="pre">Rectifier</span></code>, <code class="docutils literal notranslate"><span class="pre">Softplus</span></code>, <code class="docutils literal notranslate"><span class="pre">TanhLeCun</span></code>, <code class="docutils literal notranslate"><span class="pre">Linear</span></code>, <code class="docutils literal notranslate"><span class="pre">Saturation</span></code> or <code class="docutils literal notranslate"><span class="pre">Tanh</span></code>
(none by default)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">ScalesSharing</span></code> []</p></td>
<td><p>Share the scales with an other layer</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">BiasesSharing</span></code> []</p></td>
<td><p>Share the biases with an other layer</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">MeansSharing</span></code> []</p></td>
<td><p>Share the means with an other layer</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">VariancesSharing</span></code> []</p></td>
<td><p>Share the variances with an other layer</p></td>
</tr>
</tbody>
</table>
<div class="section" id="id6">
<h3>Configuration parameters (<em>Frame</em> models)<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
<table class="docutils align-default">
<colgroup>
<col style="width: 15%" />
<col style="width: 7%" />
<col style="width: 78%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Option [default value]</p></th>
<th class="head"><p>Model(s)</p></th>
<th class="head"><p>Description</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">Solvers.</span></code>*</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Any solver parameters</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">ScaleSolver.</span></code>*</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Scale solver parameters, take precedence over the <code class="docutils literal notranslate"><span class="pre">Solvers.</span></code>* parameters</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">BiasSolver.</span></code>*</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Bias solver parameters, take precedence over the <code class="docutils literal notranslate"><span class="pre">Solvers.</span></code>* parameters</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">Epsilon</span></code> [0.0]</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>Epsilon value used in the batch normalization formula. If 0.0, automatically choose the minimum possible value.</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">MovingAverageMomentum</span></code> [0.1]</p></td>
<td><p><em>all Frame</em></p></td>
<td><p>MovingAverageMomentum: used for the moving average of batch-wise means and standard deviations during training. The closer to 1.0, the more it will depend on the last batch.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="conv">
<h2>Conv<a class="headerlink" href="#conv" title="Permalink to this headline">¶</a></h2>
<p>Convolutional layer.</p>
<table class="docutils align-default">
<colgroup>