Skip to content

Commit eaff7e8

Browse files
committed
cleanup resnet; tuts; configs
1 parent 9f4567a commit eaff7e8

11 files changed

+863
-3412
lines changed

config/model/image/convnetx.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ num_classes: 10 #default value overridden by hydra at instantiation if necessary
44

55
nnet:
66
_target_: nimrod.models.conv.ConvNet
7-
n_features: [1, 8, 16, 32, 64, 128] # channel/feature expansion
7+
n_features: [1, 8, 16, 32, 16] # channel/feature expansion
88
num_classes: ${..num_classes} # number of output classes
99
kernel_size: 3 # convolution kernel size
1010
bias: null # disable bias since using BatchNorm

config/model/image/resnetx.yaml

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
_target_: nimrod.models.conv.ConvNetX
1+
_target_: nimrod.models.resnet.ResNetX
22
_partial_: true
33
num_classes: 10 #default value overridden by hydra at instantiation if necessary
44

55
nnet:
6-
_target_: nimrod.models.conv.ConvNet
7-
n_features: [1, 8, 16, 32, 64, 128] # channel/feature expansion
6+
_target_: nimrod.models.resnet.ResNet
7+
n_features: [1, 8, 16, 32, 16] # channel/feature expansion
88
num_classes: ${..num_classes} # number of output classes
9-
kernel_size: 3 # convolution kernel size
10-
bias: null # disable bias since using BatchNorm
11-
normalization:
12-
_target_: hydra.utils.get_class
13-
path: torch.nn.BatchNorm2d
14-
activation:
15-
_target_: hydra.utils.get_class
16-
path: torch.nn.ReLU
179

1810
# optimizer
1911
# scheduler

nbs/models.conv.ipynb

+25-12
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,7 @@
2020
"cell_type": "code",
2121
"execution_count": null,
2222
"metadata": {},
23-
"outputs": [
24-
{
25-
"name": "stdout",
26-
"output_type": "stream",
27-
"text": [
28-
"The autoreload extension is already loaded. To reload it, use:\n",
29-
" %reload_ext autoreload\n"
30-
]
31-
}
32-
],
23+
"outputs": [],
3324
"source": [
3425
"#| hide\n",
3526
"%load_ext autoreload\n",
@@ -41,7 +32,16 @@
4132
"cell_type": "code",
4233
"execution_count": null,
4334
"metadata": {},
44-
"outputs": [],
35+
"outputs": [
36+
{
37+
"name": "stderr",
38+
"output_type": "stream",
39+
"text": [
40+
"[15:21:53] INFO - PyTorch version 2.5.1 available.\n",
41+
"Seed set to 42\n"
42+
]
43+
}
44+
],
4545
"source": [
4646
"#| export\n",
4747
"import torch.nn as nn\n",
@@ -479,6 +479,11 @@
479479
"### Usage"
480480
]
481481
},
482+
{
483+
"cell_type": "markdown",
484+
"metadata": {},
485+
"source": []
486+
},
482487
{
483488
"cell_type": "code",
484489
"execution_count": null,
@@ -1695,7 +1700,15 @@
16951700
"cell_type": "code",
16961701
"execution_count": null,
16971702
"metadata": {},
1698-
"outputs": [],
1703+
"outputs": [
1704+
{
1705+
"name": "stderr",
1706+
"output_type": "stream",
1707+
"text": [
1708+
"Seed set to 42\n"
1709+
]
1710+
}
1711+
],
16991712
"source": [
17001713
"cfg = OmegaConf.load('../config/model/image/convnetx.yaml')\n",
17011714
"model = instantiate(cfg.nnet)"

0 commit comments

Comments
 (0)