99block = ResBlock(1 , 64 , 64 )
1010block
1111```
12- ???+ done " output"
12+ < details open > < summary > output</ summary >
1313 <pre>ResBlock(
1414 (convs): Sequential(
1515 (conv_0): ConvBnAct(
2323 )
2424 )
2525 (act_fn): ReLU(inplace=True)
26- )
26+ )<pre>
27+ </details >
2728
2829
2930
3233block = ResBlock(4 , 64 , 64 , dw = True )
3334block
3435```
35- ???+ done " output"
36+ < details open > < summary > output</ summary >
3637 <pre>ResBlock(
3738 (convs): Sequential(
3839 (conv_0): ConvBnAct(
5152 )
5253 )
5354 (act_fn): ReLU(inplace=True)
54- )
55+ )<pre>
56+ </details >
5557
5658
5759
6062block = ResBlock(4 , 64 , 64 ,groups = 4 )
6163block
6264```
63- ???+ done " output"
65+ < details open > < summary > output</ summary >
6466 <pre>ResBlock(
6567 (convs): Sequential(
6668 (conv_0): ConvBnAct(
7981 )
8082 )
8183 (act_fn): ReLU(inplace=True)
82- )
84+ )<pre>
85+ </details >
8386
8487
8588
8992block = ResBlock(2 , 64 , 64 ,act_fn = nn.LeakyReLU(), bn_1st = False )
9093block
9194```
92- ??? done " output"
95+ < details > < summary > output</ summary >
9396 <pre>ResBlock(
9497 (convs): Sequential(
9598 (conv_0): ConvBnAct(
@@ -108,7 +111,8 @@ block
108111 )
109112 )
110113 (act_fn): LeakyReLU(negative_slope=0.01)
111- )
114+ )<pre>
115+ </details >
112116
113117
114118
@@ -118,7 +122,7 @@ block
118122lock = ResBlock(2 , 32 , 64 , dw = True )
119123block
120124```
121- ??? done " output"
125+ < details > < summary > output</ summary >
122126 <pre>ResBlock(
123127 (convs): Sequential(
124128 (conv_0): ConvBnAct(
@@ -137,7 +141,8 @@ block
137141 )
138142 )
139143 (act_fn): LeakyReLU(negative_slope=0.01)
140- )
144+ )<pre>
145+ </details >
141146
142147
143148
@@ -152,7 +157,7 @@ pool = nn.AvgPool2d(2, ceil_mode=True)
152157block = ResBlock(2 , 32 , 64 , stride = 2 , dw = True , pool = pool)
153158block
154159```
155- ??? done " output"
160+ < details > < summary > output</ summary >
156161 <pre>ResBlock(
157162 (convs): Sequential(
158163 (conv_0): ConvBnAct(
@@ -178,7 +183,8 @@ block
178183 )
179184 )
180185 (act_fn): ReLU(inplace=True)
181- )
186+ )<pre>
187+ </details >
182188
183189
184190
@@ -193,7 +199,7 @@ from model_constructor.layers import SEModule, SimpleSelfAttention
193199block = ResBlock(2 , 32 , 64 , stride = 2 , dw = True , pool = pool, se = SEModule)
194200block
195201```
196- ??? done " output"
202+ < details > < summary > output</ summary >
197203 <pre>ResBlock(
198204 (convs): Sequential(
199205 (conv_0): ConvBnAct(
@@ -228,7 +234,8 @@ block
228234 )
229235 )
230236 (act_fn): ReLU(inplace=True)
231- )
237+ )<pre>
238+ </details >
232239
233240
234241
@@ -238,7 +245,7 @@ block
238245block = ResBlock(2 , 32 , 64 , stride = 2 , dw = True , pool = pool, se = SEModule, sa = SimpleSelfAttention)
239246block
240247```
241- ??? done " output"
248+ < details > < summary > output</ summary >
242249 <pre>ResBlock(
243250 (convs): Sequential(
244251 (conv_0): ConvBnAct(
@@ -276,7 +283,8 @@ block
276283 )
277284 )
278285 (act_fn): ReLU(inplace=True)
279- )
286+ )<pre>
287+ </details >
280288
281289
282290
@@ -332,7 +340,7 @@ stem_bn_end: <span style="color: #ff0000; text-decoration-color: #ff0000; font-s
332340stem = make_stem(cfg)
333341stem
334342```
335- ??? done " output"
343+ < details > < summary > output</ summary >
336344 <pre>Sequential(
337345 (conv_0): ConvBnAct(
338346 (conv): Conv2d(32, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
345353 (act_fn): ReLU(inplace=True)
346354 )
347355 (stem_pool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
348- )
356+ )<pre>
357+ </details >
349358
350359
351360
359368layer = make_layer(cfg, layer_num = 0 )
360369layer
361370```
362- ??? done " output"
371+ < details > < summary > output</ summary >
363372 <pre>Sequential(
364373 (bl_0): ResBlock(
365374 (convs): Sequential(
@@ -389,7 +398,8 @@ layer
389398 )
390399 (act_fn): ReLU(inplace=True)
391400 )
392- )
401+ )<pre>
402+ </details >
393403
394404
395405
@@ -404,7 +414,7 @@ cfg.make_layer = make_layer
404414body = make_body(cfg)
405415body
406416```
407- ??? done " output"
417+ < details > < summary > output</ summary >
408418 <pre>Sequential(
409419 (l_0): Sequential(
410420 (bl_0): ResBlock(
547557 (act_fn): ReLU(inplace=True)
548558 )
549559 )
550- )
560+ )<pre>
561+ </details >
551562
552563
553564
@@ -559,12 +570,13 @@ body
559570head = make_head(cfg)
560571head
561572```
562- ??? done " output"
573+ < details > < summary > output</ summary >
563574 <pre>Sequential(
564575 (pool): AdaptiveAvgPool2d(output_size=1)
565576 (flat): Flatten(start_dim=1, end_dim=-1)
566577 (fc): Linear(in_features=512, out_features=1000, bias=True)
567- )
578+ )<pre>
579+ </details >
568580
569581
570582
@@ -575,14 +587,15 @@ head
575587mc = ModelConstructor()
576588mc
577589```
578- ???+ done " output"
590+ < details open > < summary > output</ summary >
579591 <pre>MC constructor
580592 in_chans: 3, num_classes: 1000
581593 expansion: 1, groups: 1, dw: False, div_groups: None
582594 sa: False, se: False
583595 stem sizes: [3, 32, 32, 64], stride on 0
584596 body sizes [64, 128, 256, 512]
585- layers: [ 2, 2, 2, 2]
597+ layers: [2, 2, 2, 2]<pre>
598+ </details >
586599
587600
588601
591604
592605mc.stem
593606```
594- ??? done " output"
607+ < details > < summary > output</ summary >
595608 <pre>Sequential(
596609 (conv_0): ConvBnAct(
597610 (conv): Conv2d(3, 32, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)
@@ -609,7 +622,8 @@ mc.stem
609622 (act_fn): ReLU(inplace=True)
610623 )
611624 (stem_pool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
612- )
625+ )<pre>
626+ </details >
613627
614628
615629
@@ -619,7 +633,7 @@ mc.stem
619633mc.stem_stride_on = 1
620634mc.stem
621635```
622- ??? done " output"
636+ < details > < summary > output</ summary >
623637 <pre>Sequential(
624638 (conv_0): ConvBnAct(
625639 (conv): Conv2d(3, 32, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
@@ -637,7 +651,8 @@ mc.stem
637651 (act_fn): ReLU(inplace=True)
638652 )
639653 (stem_pool): MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
640- )
654+ )<pre>
655+ </details >
641656
642657
643658
@@ -662,7 +677,7 @@ mc.se = SEModule
662677
663678mc.body.l_0
664679```
665- ??? done " output"
680+ < details > < summary > output</ summary >
666681 <pre>Sequential(
667682 (bl_0): ResBlock(
668683 (convs): Sequential(
@@ -713,7 +728,8 @@ mc.body.l_0
713728 )
714729 (act_fn): LeakyReLU(negative_slope=0.01, inplace=True)
715730 )
716- )
731+ )<pre>
732+ </details >
717733
718734
719735
0 commit comments