You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, _remap_standard_resnet_model is designed according to the network structure shown in https://pytorch.org/vision/main/models/generated/torchvision.models.resnet50.html .
Therefore, we assume that there is not extra key (see also here ) to extract the expected state dict.
It would be nice to make the network be compatible with the weights that contain some other keys. For example, users may also save other information rather than state dict within the weights:
Therefore, I suggest we can add an arg to support this kind of case. In addition, we can also add some notifications within the load function to help users double check that if the load method is successful.
Fixes#6268 .
### Description
This PR enhances Hovernet's load pretrained function.
### 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: Yiheng Wang <[email protected]>
Currently,
_remap_standard_resnet_model
is designed according to the network structure shown in https://pytorch.org/vision/main/models/generated/torchvision.models.resnet50.html .Therefore, we assume that there is not extra key (see also here ) to extract the expected state dict.
It would be nice to make the network be compatible with the weights that contain some other keys. For example, users may also save other information rather than state dict within the weights:
Therefore, I suggest we can add an arg to support this kind of case. In addition, we can also add some notifications within the load function to help users double check that if the load method is successful.
cc @KumoLiu
The text was updated successfully, but these errors were encountered: