Skip to content

Commit a7ec52c

Browse files
committed
fix docs
1 parent 6029fc4 commit a7ec52c

27 files changed

+229
-1503
lines changed

Nbs/00_ModelConstructor.ipynb

+20-60
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,24 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 1,
14+
"execution_count": 66,
1515
"metadata": {
1616
"ExecuteTime": {
1717
"end_time": "2021-12-28T14:55:32.612382Z",
1818
"start_time": "2021-12-28T14:55:32.597873Z"
1919
},
2020
"code_folding": []
2121
},
22-
"outputs": [],
22+
"outputs": [
23+
{
24+
"name": "stdout",
25+
"output_type": "stream",
26+
"text": [
27+
"The autoreload extension is already loaded. To reload it, use:\n",
28+
" %reload_ext autoreload\n"
29+
]
30+
}
31+
],
2332
"source": [
2433
"#hide\n",
2534
"%load_ext autoreload\n",
@@ -28,7 +37,7 @@
2837
},
2938
{
3039
"cell_type": "code",
31-
"execution_count": 2,
40+
"execution_count": 67,
3241
"metadata": {
3342
"ExecuteTime": {
3443
"end_time": "2021-12-28T14:55:33.783450Z",
@@ -47,7 +56,7 @@
4756
},
4857
{
4958
"cell_type": "code",
50-
"execution_count": 3,
59+
"execution_count": 68,
5160
"metadata": {
5261
"ExecuteTime": {
5362
"end_time": "2021-12-28T14:55:33.795416Z",
@@ -71,7 +80,7 @@
7180
},
7281
{
7382
"cell_type": "code",
74-
"execution_count": 4,
83+
"execution_count": 69,
7584
"metadata": {
7685
"ExecuteTime": {
7786
"end_time": "2021-12-28T14:55:33.808205Z",
@@ -86,7 +95,7 @@
8695
},
8796
{
8897
"cell_type": "code",
89-
"execution_count": 5,
98+
"execution_count": 71,
9099
"metadata": {
91100
"ExecuteTime": {
92101
"end_time": "2021-12-28T14:55:33.830477Z",
@@ -101,24 +110,7 @@
101110
"\n",
102111
"> <code>ResBlock</code>(**`expansion`**, **`in_channels`**, **`mid_channels`**, **`stride`**=*`1`*, **`conv_layer`**=*`ConvBnAct`*, **`act_fn`**=*`ReLU(inplace=True)`*, **`zero_bn`**=*`True`*, **`bn_1st`**=*`True`*, **`groups`**=*`1`*, **`dw`**=*`False`*, **`div_groups`**=*`None`*, **`pool`**=*`None`*, **`se`**=*`None`*, **`sa`**=*`None`*) :: `Module`\n",
103112
"\n",
104-
"Resnet block\n",
105-
"\n",
106-
"||Type|Default|Details|\n",
107-
"|---|---|---|---|\n",
108-
"|**`expansion`**|||*No Content*|\n",
109-
"|**`in_channels`**|||*No Content*|\n",
110-
"|**`mid_channels`**|||*No Content*|\n",
111-
"|**`stride`**|`int`|`1`|*No Content*|\n",
112-
"|**`conv_layer`**|`type`|`ConvBnAct`|*No Content*|\n",
113-
"|**`act_fn`**|`ReLU`|`ReLU(inplace=True)`|*No Content*|\n",
114-
"|**`zero_bn`**|`bool`|`True`|*No Content*|\n",
115-
"|**`bn_1st`**|`bool`|`True`|*No Content*|\n",
116-
"|**`groups`**|`int`|`1`|*No Content*|\n",
117-
"|**`dw`**|`bool`|`False`|*No Content*|\n",
118-
"|**`div_groups`**||`None`|*No Content*|\n",
119-
"|**`pool`**||`None`|pool defined at ModelConstructor.|\n",
120-
"|**`se`**||`None`|*No Content*|\n",
121-
"|**`sa`**||`None`|*No Content*|\n"
113+
"Resnet block"
122114
],
123115
"text/plain": [
124116
"<IPython.core.display.Markdown object>"
@@ -719,7 +711,7 @@
719711
},
720712
{
721713
"cell_type": "code",
722-
"execution_count": 37,
714+
"execution_count": 72,
723715
"metadata": {
724716
"ExecuteTime": {
725717
"end_time": "2021-12-28T14:55:46.324914Z",
@@ -734,7 +726,7 @@
734726
},
735727
{
736728
"cell_type": "code",
737-
"execution_count": 38,
729+
"execution_count": 74,
738730
"metadata": {
739731
"ExecuteTime": {
740732
"end_time": "2021-12-28T14:55:47.031570Z",
@@ -745,43 +737,11 @@
745737
{
746738
"data": {
747739
"text/markdown": [
748-
"<h4 id=\"ModelConstructor\" class=\"doc_header\"><code>class</code> <code>ModelConstructor</code><a href=\"model_constructor/model_constructor.py#L116\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n",
740+
"<h4 id=\"ModelConstructor\" class=\"doc_header\"><code>class</code> <code>ModelConstructor</code><a href=\"model_constructor/model_constructor.py#L117\" class=\"source_link\" style=\"float:right\">[source]</a></h4>\n",
749741
"\n",
750742
"> <code>ModelConstructor</code>(**`name`**=*`'MC'`*, **`in_chans`**=*`3`*, **`num_classes`**=*`1000`*, **`block`**=*`ResBlock`*, **`conv_layer`**=*`ConvBnAct`*, **`block_sizes`**=*`[64, 128, 256, 512]`*, **`layers`**=*`[2, 2, 2, 2]`*, **`norm`**=*`BatchNorm2d`*, **`act_fn`**=*`ReLU(inplace=True)`*, **`pool`**=*`AvgPool2d(kernel_size=2, stride=2, padding=0)`*, **`expansion`**=*`1`*, **`groups`**=*`1`*, **`dw`**=*`False`*, **`div_groups`**=*`None`*, **`sa`**:`Union`\\[`bool`, `int`, `typing.Callable`\\]=*`False`*, **`se`**:`Union`\\[`bool`, `int`, `typing.Callable`\\]=*`False`*, **`se_module`**=*`None`*, **`se_reduction`**=*`None`*, **`bn_1st`**=*`True`*, **`zero_bn`**=*`True`*, **`stem_stride_on`**=*`0`*, **`stem_sizes`**=*`[32, 32, 64]`*, **`stem_pool`**=*`MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)`*, **`stem_bn_end`**=*`False`*, **`_init_cnn`**=*`init_cnn`*, **`_make_stem`**=*`_make_stem`*, **`_make_layer`**=*`_make_layer`*, **`_make_body`**=*`_make_body`*, **`_make_head`**=*`_make_head`*)\n",
751743
"\n",
752-
"Model constructor. As default - xresnet18\n",
753-
"\n",
754-
"||Type|Default|Details|\n",
755-
"|---|---|---|---|\n",
756-
"|**`name`**|`str`|`MC`|*No Content*|\n",
757-
"|**`in_chans`**|`int`|`3`|*No Content*|\n",
758-
"|**`num_classes`**|`int`|`1000`|*No Content*|\n",
759-
"|**`block`**|`type`|`ResBlock`|*No Content*|\n",
760-
"|**`conv_layer`**|`type`|`ConvBnAct`|*No Content*|\n",
761-
"|**`block_sizes`**|`list`|`(64, 128, 256, 512)`|*No Content*|\n",
762-
"|**`layers`**|`list`|`(2, 2, 2, 2)`|*No Content*|\n",
763-
"|**`norm`**|`type`|`BatchNorm2d`|*No Content*|\n",
764-
"|**`act_fn`**|`ReLU`|`ReLU(inplace=True)`|*No Content*|\n",
765-
"|**`pool`**|`AvgPool2d`|`AvgPool2d(kernel_size=2, stride=2, padding=0)`|*No Content*|\n",
766-
"|**`expansion`**|`int`|`1`|*No Content*|\n",
767-
"|**`groups`**|`int`|`1`|*No Content*|\n",
768-
"|**`dw`**|`bool`|`False`|*No Content*|\n",
769-
"|**`div_groups`**||`None`|*No Content*|\n",
770-
"|**`sa`**|`typing.Union[bool, int, typing.Callable]`|`False`|*No Content*|\n",
771-
"|**`se`**|`typing.Union[bool, int, typing.Callable]`|`False`|se can be bool, int (0, 1) or nn.Module|\n",
772-
"|**`se_module`**||`None`|*No Content*|\n",
773-
"|**`se_reduction`**||`None`|deprecated. Leaved for worning and checks.|\n",
774-
"|**`bn_1st`**|`bool`|`True`|*No Content*|\n",
775-
"|**`zero_bn`**|`bool`|`True`|*No Content*|\n",
776-
"|**`stem_stride_on`**|`int`|`0`|*No Content*|\n",
777-
"|**`stem_sizes`**|`list`|`(32, 32, 64)`|*No Content*|\n",
778-
"|**`stem_pool`**|`MaxPool2d`|`MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)`|if stem_pool is False - no pool at stem|\n",
779-
"|**`stem_bn_end`**|`bool`|`False`|*No Content*|\n",
780-
"|**`_init_cnn`**|`function`|`init_cnn`|*No Content*|\n",
781-
"|**`_make_stem`**|`function`|`_make_stem`|*No Content*|\n",
782-
"|**`_make_layer`**|`function`|`_make_layer`|*No Content*|\n",
783-
"|**`_make_body`**|`function`|`_make_body`|*No Content*|\n",
784-
"|**`_make_head`**|`function`|`_make_head`|*No Content*|\n"
744+
"Model constructor. As default - xresnet18"
785745
],
786746
"text/plain": [
787747
"<IPython.core.display.Markdown object>"

0 commit comments

Comments
 (0)