Skip to content

Commit

Permalink
Fix typo in the PerceptualNetworkType Enum (Project-MONAI#7548)
Browse files Browse the repository at this point in the history
Fixes Project-MONAI#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>
Signed-off-by: Yu0610 <612410030@alum.ccu.edu.tw>
  • Loading branch information
SomeUserName1 authored and Yu0610 committed Apr 11, 2024
1 parent 898b6a2 commit ff089b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion monai/losses/perceptual.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PercetualNetworkType(StrEnum):
squeeze = "squeeze"
radimagenet_resnet50 = "radimagenet_resnet50"
medicalnet_resnet10_23datasets = "medicalnet_resnet10_23datasets"
medical_resnet50_23datasets = "medical_resnet50_23datasets"
medicalnet_resnet50_23datasets = "medicalnet_resnet50_23datasets"
resnet50 = "resnet50"


Expand Down
5 changes: 5 additions & 0 deletions tests/test_perceptual_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
(2, 1, 64, 64, 64),
(2, 1, 64, 64, 64),
],
[
{"spatial_dims": 3, "network_type": "medicalnet_resnet50_23datasets", "is_fake_3d": False},
(2, 1, 64, 64, 64),
(2, 1, 64, 64, 64),
],
[
{"spatial_dims": 3, "network_type": "resnet50", "is_fake_3d": True, "pretrained": True, "fake_3d_ratio": 0.2},
(2, 1, 64, 64, 64),
Expand Down

0 comments on commit ff089b3

Please sign in to comment.