1[net]
2# Training
3batch=120
4subdivisions=4
5# Testing
6#batch=1
7#subdivisions=1
8height=224
9width=224
10channels=3
11momentum=0.9
12decay=0.0005
13max_crop=256
14#mixup=4
15blur=1
16cutmix=1
17mosaic=1
18
19burn_in=1000
20#burn_in=100
21learning_rate=0.256
22policy=poly
23power=4
24max_batches=800000
25momentum=0.9
26decay=0.00005
27
28angle=7
29hue=.1
30saturation=.75
31exposure=.75
32aspect=.75
33
34
35### CONV1 - 1 (1)
36# conv1
37[convolutional]
38filters=32
39size=3
40pad=1
41stride=2
42batch_normalize=1
43activation=swish
44
45
46### CONV2 - MBConv1 - 1 (1)
47# conv2_1_expand
48[convolutional]
49filters=32
50size=1
51stride=1
52pad=0
53batch_normalize=1
54activation=swish
55
56# conv2_1_dwise
57[convolutional]
58groups=32
59filters=32
60size=3
61stride=1
62pad=1
63batch_normalize=1
64activation=swish
65
66
67#squeeze-n-excitation
68[avgpool]
69
70# squeeze ratio r=4 (recommended r=16)
71[convolutional]
72filters=8
73size=1
74stride=1
75activation=swish
76
77# excitation
78[convolutional]
79filters=32
80size=1
81stride=1
82activation=logistic
83
84# multiply channels
85[scale_channels]
86from=-4
87
88
89# conv2_1_linear
90[convolutional]
91filters=16
92size=1
93stride=1
94pad=0
95batch_normalize=1
96activation=linear
97
98
99
100### CONV3 - MBConv6 - 1 (2)
101# conv2_2_expand
102[convolutional]
103filters=96
104size=1
105stride=1
106pad=0
107batch_normalize=1
108activation=swish
109
110# conv2_2_dwise
111[convolutional]
112groups=96
113filters=96
114size=3
115pad=1
116stride=2
117batch_normalize=1
118activation=swish
119
120
121#squeeze-n-excitation
122[avgpool]
123
124# squeeze ratio r=8 (recommended r=16)
125[convolutional]
126filters=16
127size=1
128stride=1
129activation=swish
130
131# excitation
132[convolutional]
133filters=96
134size=1
135stride=1
136activation=logistic
137
138# multiply channels
139[scale_channels]
140from=-4
141
142
143# conv2_2_linear
144[convolutional]
145filters=24
146size=1
147stride=1
148pad=0
149batch_normalize=1
150activation=linear
151
152
153### CONV3 - MBConv6 - 2 (2)
154# conv3_1_expand
155[convolutional]
156filters=144
157size=1
158stride=1
159pad=0
160batch_normalize=1
161activation=swish
162
163# conv3_1_dwise
164[convolutional]
165groups=144
166filters=144
167size=3
168stride=1
169pad=1
170batch_normalize=1
171activation=swish
172
173
174#squeeze-n-excitation
175[avgpool]
176
177# squeeze ratio r=16 (recommended r=16)
178[convolutional]
179filters=8
180size=1
181stride=1
182activation=swish
183
184# excitation
185[convolutional]
186filters=144
187size=1
188stride=1
189activation=logistic
190
191# multiply channels
192[scale_channels]
193from=-4
194
195
196# conv3_1_linear
197[convolutional]
198filters=24
199size=1
200stride=1
201pad=0
202batch_normalize=1
203activation=linear
204
205
206
207### CONV4 - MBConv6 - 1 (2)
208# dropout only before residual connection
209[dropout]
210probability=.2
211
212# block_3_1
213[shortcut]
214from=-9
215activation=linear
216
217# conv_3_2_expand
218[convolutional]
219filters=144
220size=1
221stride=1
222pad=0
223batch_normalize=1
224activation=swish
225
226# conv_3_2_dwise
227[convolutional]
228groups=144
229filters=144
230size=5
231pad=1
232stride=2
233batch_normalize=1
234activation=swish
235
236
237#squeeze-n-excitation
238[avgpool]
239
240# squeeze ratio r=16 (recommended r=16)
241[convolutional]
242filters=8
243size=1
244stride=1
245activation=swish
246
247# excitation
248[convolutional]
249filters=144
250size=1
251stride=1
252activation=logistic
253
254# multiply channels
255[scale_channels]
256from=-4
257
258
259# conv_3_2_linear
260[convolutional]
261filters=40
262size=1
263stride=1
264pad=0
265batch_normalize=1
266activation=linear
267
268
269### CONV4 - MBConv6 - 2 (2)
270# conv_4_1_expand
271[convolutional]
272filters=192
273size=1
274stride=1
275pad=0
276batch_normalize=1
277activation=swish
278
279# conv_4_1_dwise
280[convolutional]
281groups=192
282filters=192
283size=5
284stride=1
285pad=1
286batch_normalize=1
287activation=swish
288
289
290#squeeze-n-excitation
291[avgpool]
292
293# squeeze ratio r=16 (recommended r=16)
294[convolutional]
295filters=16
296size=1
297stride=1
298activation=swish
299
300# excitation
301[convolutional]
302filters=192
303size=1
304stride=1
305activation=logistic
306
307# multiply channels
308[scale_channels]
309from=-4
310
311
312# conv_4_1_linear
313[convolutional]
314filters=40
315size=1
316stride=1
317pad=0
318batch_normalize=1
319activation=linear
320
321
322
323
324### CONV5 - MBConv6 - 1 (3)
325# dropout only before residual connection
326[dropout]
327probability=.2
328
329# block_4_2
330[shortcut]
331from=-9
332activation=linear
333
334# conv_4_3_expand
335[convolutional]
336filters=192
337size=1
338stride=1
339pad=0
340batch_normalize=1
341activation=swish
342
343# conv_4_3_dwise
344[convolutional]
345groups=192
346filters=192
347size=3
348stride=1
349pad=1
350batch_normalize=1
351activation=swish
352
353
354#squeeze-n-excitation
355[avgpool]
356
357# squeeze ratio r=16 (recommended r=16)
358[convolutional]
359filters=16
360size=1
361stride=1
362activation=swish
363
364# excitation
365[convolutional]
366filters=192
367size=1
368stride=1
369activation=logistic
370
371# multiply channels
372[scale_channels]
373from=-4
374
375
376# conv_4_3_linear
377[convolutional]
378filters=80
379size=1
380stride=1
381pad=0
382batch_normalize=1
383activation=linear
384
385
386### CONV5 - MBConv6 - 2 (3)
387# conv_4_4_expand
388[convolutional]
389filters=384
390size=1
391stride=1
392pad=0
393batch_normalize=1
394activation=swish
395
396# conv_4_4_dwise
397[convolutional]
398groups=384
399filters=384
400size=3
401stride=1
402pad=1
403batch_normalize=1
404activation=swish
405
406
407#squeeze-n-excitation
408[avgpool]
409
410# squeeze ratio r=16 (recommended r=16)
411[convolutional]
412filters=24
413size=1
414stride=1
415activation=swish
416
417# excitation
418[convolutional]
419filters=384
420size=1
421stride=1
422activation=logistic
423
424# multiply channels
425[scale_channels]
426from=-4
427
428
429# conv_4_4_linear
430[convolutional]
431filters=80
432size=1
433stride=1
434pad=0
435batch_normalize=1
436activation=linear
437
438
439### CONV5 - MBConv6 - 3 (3)
440# dropout only before residual connection
441[dropout]
442probability=.2
443
444# block_4_4
445[shortcut]
446from=-9
447activation=linear
448
449# conv_4_5_expand
450[convolutional]
451filters=384
452size=1
453stride=1
454pad=0
455batch_normalize=1
456activation=swish
457
458# conv_4_5_dwise
459[convolutional]
460groups=384
461filters=384
462size=3
463stride=1
464pad=1
465batch_normalize=1
466activation=swish
467
468
469#squeeze-n-excitation
470[avgpool]
471
472# squeeze ratio r=16 (recommended r=16)
473[convolutional]
474filters=24
475size=1
476stride=1
477activation=swish
478
479# excitation
480[convolutional]
481filters=384
482size=1
483stride=1
484activation=logistic
485
486# multiply channels
487[scale_channels]
488from=-4
489
490
491# conv_4_5_linear
492[convolutional]
493filters=80
494size=1
495stride=1
496pad=0
497batch_normalize=1
498activation=linear
499
500
501
502### CONV6 - MBConv6 - 1 (3)
503# dropout only before residual connection
504[dropout]
505probability=.2
506
507# block_4_6
508[shortcut]
509from=-9
510activation=linear
511
512# conv_4_7_expand
513[convolutional]
514filters=384
515size=1
516stride=1
517pad=0
518batch_normalize=1
519activation=swish
520
521# conv_4_7_dwise
522[convolutional]
523groups=384
524filters=384
525size=5
526pad=1
527stride=2
528batch_normalize=1
529activation=swish
530
531
532#squeeze-n-excitation
533[avgpool]
534
535# squeeze ratio r=16 (recommended r=16)
536[convolutional]
537filters=24
538size=1
539stride=1
540activation=swish
541
542# excitation
543[convolutional]
544filters=384
545size=1
546stride=1
547activation=logistic
548
549# multiply channels
550[scale_channels]
551from=-4
552
553
554# conv_4_7_linear
555[convolutional]
556filters=112
557size=1
558stride=1
559pad=0
560batch_normalize=1
561activation=linear
562
563
564### CONV6 - MBConv6 - 2 (3)
565# conv_5_1_expand
566[convolutional]
567filters=576
568size=1
569stride=1
570pad=0
571batch_normalize=1
572activation=swish
573
574# conv_5_1_dwise
575[convolutional]
576groups=576
577filters=576
578size=5
579stride=1
580pad=1
581batch_normalize=1
582activation=swish
583
584
585#squeeze-n-excitation
586[avgpool]
587
588# squeeze ratio r=16 (recommended r=16)
589[convolutional]
590filters=32
591size=1
592stride=1
593activation=swish
594
595# excitation
596[convolutional]
597filters=576
598size=1
599stride=1
600activation=logistic
601
602# multiply channels
603[scale_channels]
604from=-4
605
606
607# conv_5_1_linear
608[convolutional]
609filters=112
610size=1
611stride=1
612pad=0
613batch_normalize=1
614activation=linear
615
616
617### CONV6 - MBConv6 - 3 (3)
618# dropout only before residual connection
619[dropout]
620probability=.2
621
622# block_5_1
623[shortcut]
624from=-9
625activation=linear
626
627# conv_5_2_expand
628[convolutional]
629filters=576
630size=1
631stride=1
632pad=0
633batch_normalize=1
634activation=swish
635
636# conv_5_2_dwise
637[convolutional]
638groups=576
639filters=576
640size=5
641stride=1
642pad=1
643batch_normalize=1
644activation=swish
645
646
647#squeeze-n-excitation
648[avgpool]
649
650# squeeze ratio r=16 (recommended r=16)
651[convolutional]
652filters=32
653size=1
654stride=1
655activation=swish
656
657# excitation
658[convolutional]
659filters=576
660size=1
661stride=1
662activation=logistic
663
664# multiply channels
665[scale_channels]
666from=-4
667
668
669# conv_5_2_linear
670[convolutional]
671filters=112
672size=1
673stride=1
674pad=0
675batch_normalize=1
676activation=linear
677
678
679### CONV7 - MBConv6 - 1 (4)
680# dropout only before residual connection
681[dropout]
682probability=.2
683
684# block_5_2
685[shortcut]
686from=-9
687activation=linear
688
689# conv_5_3_expand
690[convolutional]
691filters=576
692size=1
693stride=1
694pad=0
695batch_normalize=1
696activation=swish
697
698# conv_5_3_dwise
699[convolutional]
700groups=576
701filters=576
702size=5
703pad=1
704stride=2
705batch_normalize=1
706activation=swish
707
708
709#squeeze-n-excitation
710[avgpool]
711
712# squeeze ratio r=16 (recommended r=16)
713[convolutional]
714filters=32
715size=1
716stride=1
717activation=swish
718
719# excitation
720[convolutional]
721filters=576
722size=1
723stride=1
724activation=logistic
725
726# multiply channels
727[scale_channels]
728from=-4
729
730
731# conv_5_3_linear
732[convolutional]
733filters=192
734size=1
735stride=1
736pad=0
737batch_normalize=1
738activation=linear
739
740
741### CONV7 - MBConv6 - 2 (4)
742# conv_6_1_expand
743[convolutional]
744filters=960
745size=1
746stride=1
747pad=0
748batch_normalize=1
749activation=swish
750
751# conv_6_1_dwise
752[convolutional]
753groups=960
754filters=960
755size=5
756stride=1
757pad=1
758batch_normalize=1
759activation=swish
760
761
762#squeeze-n-excitation
763[avgpool]
764
765# squeeze ratio r=16 (recommended r=16)
766[convolutional]
767filters=64
768size=1
769stride=1
770activation=swish
771
772# excitation
773[convolutional]
774filters=960
775size=1
776stride=1
777activation=logistic
778
779# multiply channels
780[scale_channels]
781from=-4
782
783
784# conv_6_1_linear
785[convolutional]
786filters=192
787size=1
788stride=1
789pad=0
790batch_normalize=1
791activation=linear
792
793
794### CONV7 - MBConv6 - 3 (4)
795# dropout only before residual connection
796[dropout]
797probability=.2
798
799# block_6_1
800[shortcut]
801from=-9
802activation=linear
803
804# conv_6_2_expand
805[convolutional]
806filters=960
807size=1
808stride=1
809pad=0
810batch_normalize=1
811activation=swish
812
813# conv_6_2_dwise
814[convolutional]
815groups=960
816filters=960
817size=5
818stride=1
819pad=1
820batch_normalize=1
821activation=swish
822
823
824#squeeze-n-excitation
825[avgpool]
826
827# squeeze ratio r=16 (recommended r=16)
828[convolutional]
829filters=64
830size=1
831stride=1
832activation=swish
833
834# excitation
835[convolutional]
836filters=960
837size=1
838stride=1
839activation=logistic
840
841# multiply channels
842[scale_channels]
843from=-4
844
845
846# conv_6_2_linear
847[convolutional]
848filters=192
849size=1
850stride=1
851pad=0
852batch_normalize=1
853activation=linear
854
855
856### CONV7 - MBConv6 - 4 (4)
857# dropout only before residual connection
858[dropout]
859probability=.2
860
861# block_6_1
862[shortcut]
863from=-9
864activation=linear
865
866# conv_6_2_expand
867[convolutional]
868filters=960
869size=1
870stride=1
871pad=0
872batch_normalize=1
873activation=swish
874
875# conv_6_2_dwise
876[convolutional]
877groups=960
878filters=960
879size=5
880stride=1
881pad=1
882batch_normalize=1
883activation=swish
884
885
886#squeeze-n-excitation
887[avgpool]
888
889# squeeze ratio r=16 (recommended r=16)
890[convolutional]
891filters=64
892size=1
893stride=1
894activation=swish
895
896# excitation
897[convolutional]
898filters=960
899size=1
900stride=1
901activation=logistic
902
903# multiply channels
904[scale_channels]
905from=-4
906
907
908# conv_6_2_linear
909[convolutional]
910filters=192
911size=1
912stride=1
913pad=0
914batch_normalize=1
915activation=linear
916
917
918
919### CONV8 - MBConv6 - 1 (1)
920# dropout only before residual connection
921[dropout]
922probability=.2
923
924# block_6_2
925[shortcut]
926from=-9
927activation=linear
928
929# conv_6_3_expand
930[convolutional]
931filters=960
932size=1
933stride=1
934pad=0
935batch_normalize=1
936activation=swish
937
938# conv_6_3_dwise
939[convolutional]
940groups=960
941filters=960
942size=3
943stride=1
944pad=1
945batch_normalize=1
946activation=swish
947
948
949#squeeze-n-excitation
950[avgpool]
951
952# squeeze ratio r=16 (recommended r=16)
953[convolutional]
954filters=64
955size=1
956stride=1
957activation=swish
958
959# excitation
960[convolutional]
961filters=960
962size=1
963stride=1
964activation=logistic
965
966# multiply channels
967[scale_channels]
968from=-4
969
970
971# conv_6_3_linear
972[convolutional]
973filters=320
974size=1
975stride=1
976pad=0
977batch_normalize=1
978activation=linear
979
980
981### CONV9 - Conv2d 1x1
982# conv_6_4
983[convolutional]
984filters=1280
985size=1
986stride=1
987pad=0
988batch_normalize=1
989activation=swish
990
991
992[avgpool]
993
994[dropout]
995probability=.2
996
997[convolutional]
998filters=1000
999size=1
1000stride=1
1001pad=0
1002activation=linear
1003
1004[softmax]
1005groups=1
1006
1007#[cost]
1008#type=sse
1009
1010