Skip to content

Commit 6b7568d

Browse files
Fix typo in the PerceptualNetworkType Enum (#7548)
Fixes #7547 ### Description Previously it was 'medical_resnet50_23datasets' for both identifier and string, which doesn't correspond to the name in the hubconf.py of Warvito's repo. Now it is the correct version (according to Warvitos repo) 'medicalnet_resnet50_23datasets'. The docs state it correctly already. ### 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). - [ x] New tests added to cover the changes. - [ x] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [x ] 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: Fabian Klopfer <fabian.klopfer@ieee.org>
1 parent 95f69de commit 6b7568d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

monai/losses/perceptual.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PercetualNetworkType(StrEnum):
2929
squeeze = "squeeze"
3030
radimagenet_resnet50 = "radimagenet_resnet50"
3131
medicalnet_resnet10_23datasets = "medicalnet_resnet10_23datasets"
32-
medical_resnet50_23datasets = "medical_resnet50_23datasets"
32+
medicalnet_resnet50_23datasets = "medicalnet_resnet50_23datasets"
3333
resnet50 = "resnet50"
3434

3535

tests/test_perceptual_loss.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@
4040
(2, 1, 64, 64, 64),
4141
(2, 1, 64, 64, 64),
4242
],
43+
[
44+
{"spatial_dims": 3, "network_type": "medicalnet_resnet50_23datasets", "is_fake_3d": False},
45+
(2, 1, 64, 64, 64),
46+
(2, 1, 64, 64, 64),
47+
],
4348
[
4449
{"spatial_dims": 3, "network_type": "resnet50", "is_fake_3d": True, "pretrained": True, "fake_3d_ratio": 0.2},
4550
(2, 1, 64, 64, 64),

0 commit comments

Comments
 (0)