Skip to content

Conversation

@bhashemian
Copy link
Member

Fixes #5393

Description

HoVerNet Loss works with PyTorch 1.10 and newer

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).

Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
@bhashemian
Copy link
Member Author

Hi @wyli, checking the release note for PyTorch 1.10, I did not find anything that can effect this but the code does not work with any version earlier than that. There should be something related to the cross entropy.

@bhashemian bhashemian requested a review from wyli October 25, 2022 18:50
@wyli
Copy link
Contributor

wyli commented Oct 25, 2022

/build

@wyli wyli enabled auto-merge (squash) October 25, 2022 19:07
@wyli wyli merged commit f407fcc into Project-MONAI:dev Oct 25, 2022
@bhashemian bhashemian deleted the fix-5393 branch October 26, 2022 14:24
JHancox added a commit to JHancox/MONAI that referenced this pull request Oct 28, 2022
For CrossEntropy, PyTorch v1.10+ allows target values to be either class probabilities or indices, whereas v1.9- only allows for class indices, so class indices are now used. This should provide a better solution for Project-MONAI#5393 and remove the need for Project-MONAI#5401

Signed-off-by: JHancox <48477639+JHancox@users.noreply.github.com>
KumoLiu pushed a commit that referenced this pull request Nov 2, 2022
Signed-off-by: KumoLiu <yunl@nvidia.com>
@JHancox JHancox mentioned this pull request Nov 3, 2022
1 task
bhashemian added a commit that referenced this pull request Nov 4, 2022
Fixes #5469  

### Description

For CrossEntropy, PyTorch v1.10+ allows target values to be either class
probabilities or indices, whereas v1.9- only allows for class indices,
so class indices are now used. This should provide a better solution for
#5393 and remove the need for #5401


### 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).

Signed-off-by: JHancox <48477639+JHancox@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Co-authored-by: Behrooz <3968947+drbeh@users.noreply.github.com>
wyli pushed a commit that referenced this pull request Nov 6, 2022
Fixes #5469  

### Description

For CrossEntropy, PyTorch v1.10+ allows target values to be either class
probabilities or indices, whereas v1.9- only allows for class indices,
so class indices are now used. This should provide a better solution for
#5393 and remove the need for #5401


### 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).

Signed-off-by: JHancox <48477639+JHancox@users.noreply.github.com>
Signed-off-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Co-authored-by: Behrooz <3968947+drbeh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_hovernet_loss error

2 participants