Skip to content

Commit 4757237

Browse files
committed
readme
1 parent 9d9e3f9 commit 4757237

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

README.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ Check base parameters with `print_cfg` method:
3232
```python
3333
mc.print_cfg()
3434
```
35-
???+ done "output"
36-
<pre>MC constructor
35+
MC constructor
3736
in_chans: 3, num_classes: 1000
3837
expansion: 1, groups: 1, dw: False, div_groups: None
3938
sa: False, se: False
@@ -88,8 +87,7 @@ Now we have model constructor, default setting as xresnet18. And we can get mode
8887
model = mc()
8988
model
9089
```
91-
??? done "output"
92-
<pre>Sequential(
90+
Sequential(
9391
MC
9492
(stem): Sequential(
9593
(conv_0): ConvBnAct(
@@ -277,8 +275,7 @@ Now we can look at model parts - stem, body, head.
277275

278276
mc.body
279277
```
280-
??? done "output"
281-
<pre>Sequential(
278+
Sequential(
282279
(l_0): Sequential(
283280
(bl_0): ResBlock(
284281
(convs): Sequential(
@@ -673,8 +670,7 @@ Now we can create constructor from config:
673670
mc = ModelConstructor.from_cfg(cfg)
674671
mc.print_cfg()
675672
```
676-
???+ done "output"
677-
<pre>MC constructor
673+
MC constructor
678674
in_chans: 3, num_classes: 1000
679675
expansion: 1, groups: 1, dw: False, div_groups: None
680676
sa: False, se: False
@@ -724,8 +720,7 @@ mc.act_fn = Mish()
724720
```python
725721
mc
726722
```
727-
???+ done "output"
728-
<pre>ModelConstructor(name='MxResNet', in_chans=3, num_classes=1000, block=<class 'model_constructor.model_constructor.ResBlock'>, conv_layer=<class 'model_constructor.layers.ConvBnAct'>, block_sizes=[64, 128, 256, 512], layers=[2, 2, 2, 2], norm=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>, act_fn=Mish(), pool=AvgPool2d(kernel_size=2, stride=2, padding=0), expansion=1, groups=1, dw=False, div_groups=None, sa=False, se=False, bn_1st=True, zero_bn=True, stem_stride_on=0, stem_sizes=[3, 32, 64, 64], stem_pool=MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False), stem_bn_end=False)
723+
ModelConstructor(name='MxResNet', in_chans=3, num_classes=1000, block=<class 'model_constructor.model_constructor.ResBlock'>, conv_layer=<class 'model_constructor.layers.ConvBnAct'>, block_sizes=[64, 128, 256, 512], layers=[2, 2, 2, 2], norm=<class 'torch.nn.modules.batchnorm.BatchNorm2d'>, act_fn=Mish(), pool=AvgPool2d(kernel_size=2, stride=2, padding=0), expansion=1, groups=1, dw=False, div_groups=None, sa=False, se=False, bn_1st=True, zero_bn=True, stem_stride_on=0, stem_sizes=[3, 32, 64, 64], stem_pool=MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False), stem_bn_end=False)
729724

730725

731726

@@ -736,8 +731,7 @@ Here is model:
736731

737732
mc()
738733
```
739-
??? done "output"
740-
<pre>Sequential(
734+
Sequential(
741735
MxResNet
742736
(stem): Sequential(
743737
(conv_0): ConvBnAct(
@@ -963,8 +957,7 @@ print(mc)
963957

964958
mc.stem.conv_1
965959
```
966-
??? done "output"
967-
<pre>ConvBnAct(
960+
ConvBnAct(
968961
(conv): Conv2d(32, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)
969962
(bn): BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
970963
(act_fn): Mish()
@@ -977,8 +970,7 @@ mc.stem.conv_1
977970

978971
mc.body.l_0.bl_0
979972
```
980-
??? done "output"
981-
<pre>ResBlock(
973+
ResBlock(
982974
(convs): Sequential(
983975
(conv_0): ConvBnAct(
984976
(conv): Conv2d(64, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)
@@ -1046,8 +1038,7 @@ That all. Now we have YaResNet constructor
10461038
mc.name = 'YaResNet'
10471039
mc.print_cfg()
10481040
```
1049-
??? done "output"
1050-
<pre>YaResNet constructor
1041+
YaResNet constructor
10511042
in_chans: 3, num_classes: 1000
10521043
expansion: 4, groups: 1, dw: False, div_groups: None
10531044
sa: False, se: False
@@ -1063,8 +1054,7 @@ Let see what we have.
10631054

10641055
mc.body.l_1.bl_0
10651056
```
1066-
??? done "output"
1067-
<pre>YaResBlock(
1057+
YaResBlock(
10681058
(reduce): AvgPool2d(kernel_size=2, stride=2, padding=0)
10691059
(convs): Sequential(
10701060
(conv_0): ConvBnAct(

0 commit comments

Comments
 (0)