Skip to content

Commit ad6a433

Browse files
authored
Fix Resnet (#7805)
Fixes #7802. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: YunLiu <[email protected]>
1 parent e5afa43 commit ad6a433

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

monai/networks/nets/resnet.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,12 @@ def __init__(
9494
super().__init__()
9595

9696
conv_type: Callable = Conv[Conv.CONV, spatial_dims]
97-
norm_layer = get_norm_layer(name=norm, spatial_dims=spatial_dims, channels=planes)
9897

9998
self.conv1 = conv_type(in_planes, planes, kernel_size=3, padding=1, stride=stride, bias=False)
100-
self.bn1 = norm_layer
99+
self.bn1 = get_norm_layer(name=norm, spatial_dims=spatial_dims, channels=planes)
101100
self.act = get_act_layer(name=act)
102101
self.conv2 = conv_type(planes, planes, kernel_size=3, padding=1, bias=False)
103-
self.bn2 = norm_layer
102+
self.bn2 = get_norm_layer(name=norm, spatial_dims=spatial_dims, channels=planes)
104103
self.downsample = downsample
105104
self.stride = stride
106105

0 commit comments

Comments
 (0)