Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nondeterministic in HoVerNet #5609

Closed
KumoLiu opened this issue Nov 30, 2022 · 4 comments · Fixed by #5818
Closed

Nondeterministic in HoVerNet #5609

KumoLiu opened this issue Nov 30, 2022 · 4 comments · Fixed by #5818
Labels
Contribution wanted documentation Improvements or additions to documentation Feature request

Comments

@KumoLiu
Copy link
Contributor

KumoLiu commented Nov 30, 2022

In the current HoVerNet implementation of MONAI, it uses UpSample with NONTRAINABLE mode which used torch.nn.functional.interpolate() may cause nondeterministic.

self.upsample = UpSample(
2, scale_factor=2, mode=UpsampleMode.NONTRAINABLE, interp_mode=InterpolateMode.BILINEAR, bias=False
)

https://pytorch.org/docs/stable/generated/torch.use_deterministic_algorithms.html#torch.use_deterministic_algorithms

Describe the solution you'd like
It may need to be explained in the docstring.

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Nov 30, 2022

cc @JHancox @drbeh, could you please double confirm it?

@JHancox
Copy link
Contributor

JHancox commented Nov 30, 2022

@KumoLiu Is this non-determinism specific to Upsample? Also, doesn't it use torch.nn.Upsample rather than torch.nn.functional.interpolate?

@KumoLiu
Copy link
Contributor Author

KumoLiu commented Nov 30, 2022

@wyli
Copy link
Contributor

wyli commented Jan 5, 2023

thanks, I'm labelling this a feature request to update the docstring for both hovernet and UpSample

@wyli wyli added the documentation Improvements or additions to documentation label Jan 5, 2023
@wyli wyli closed this as completed in #5818 Jan 6, 2023
wyli pushed a commit that referenced this issue Jan 6, 2023
Signed-off-by: KumoLiu <[email protected]>

Fixes #5609.

### Description
Update the docstring for `HoVerNet` and `UpSample`.

### 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`.
- [x] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: KumoLiu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution wanted documentation Improvements or additions to documentation Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants