Skip to content

Skip HoVerNet Loss for pytorch 1.9.1 and older#5401

Merged
wyli merged 1 commit intoProject-MONAI:devfrom
bhashemian:fix-5393
Oct 25, 2022
Merged

Skip HoVerNet Loss for pytorch 1.9.1 and older#5401
wyli merged 1 commit intoProject-MONAI:devfrom
bhashemian:fix-5393

Conversation

@bhashemian
Copy link
Copy Markdown
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).

@bhashemian
Copy link
Copy Markdown
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
Copy Markdown
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 <[email protected]>
KumoLiu pushed a commit that referenced this pull request Nov 2, 2022
@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 <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Co-authored-by: Behrooz <[email protected]>
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 <[email protected]>
Signed-off-by: Behrooz <[email protected]>
Co-authored-by: Behrooz <[email protected]>
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