Skip to content

Commit

Permalink
Fix Resnet (#7805)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
KumoLiu authored May 27, 2024
1 parent e5afa43 commit ad6a433
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions monai/networks/nets/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,12 @@ def __init__(
super().__init__()

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

self.conv1 = conv_type(in_planes, planes, kernel_size=3, padding=1, stride=stride, bias=False)
self.bn1 = norm_layer
self.bn1 = get_norm_layer(name=norm, spatial_dims=spatial_dims, channels=planes)
self.act = get_act_layer(name=act)
self.conv2 = conv_type(planes, planes, kernel_size=3, padding=1, bias=False)
self.bn2 = norm_layer
self.bn2 = get_norm_layer(name=norm, spatial_dims=spatial_dims, channels=planes)
self.downsample = downsample
self.stride = stride

Expand Down

0 comments on commit ad6a433

Please sign in to comment.