Skip to content

Update for DynUNet's changes and fix get_feature_maps issue#126

Merged
wyli merged 5 commits into
masterfrom
106-update-dynunet
Feb 26, 2021
Merged

Update for DynUNet's changes and fix get_feature_maps issue#126
wyli merged 5 commits into
masterfrom
106-update-dynunet

Conversation

@yiheng-wang-nv

@yiheng-wang-nv yiheng-wang-nv commented Feb 22, 2021

Copy link
Copy Markdown
Contributor

Fixes #106 and #128 .

Description
Due to the forward function's changes of DynUNet, this commit
update the corresponding places, as well as the loss calculation
for trainer.

In addition, the DiceCEloss has been implemented in MONAI, thus the
self-designed loss function part has also been updated.

Signed-off-by: Yiheng Wang vennw@nvidia.com

Due to the forward function's changes of DynUNet, this commit
update the corresponding places, as well as the loss calculation
for trainer.

In addition, the DiceCEloss has been implemented in MONAI, thus the
self-designed loss function part has also been updated.

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Signed-off-by: Yiheng Wang <vennw@nvidia.com>
Comment thread modules/dynunet_tutorial.ipynb Outdated
@rijobro

rijobro commented Feb 22, 2021

Copy link
Copy Markdown
Contributor

@yiheng-wang-nv thanks! Do you think you could add some comments explaining the shape of the tensor returned by forward? I'm guessing it's the torch.unbind that removes the feature maps? Could you add a comment to that affect, and mention that it's only necessary when deep_supervision==True?

@rijobro

rijobro commented Feb 23, 2021

Copy link
Copy Markdown
Contributor

fixes #128.

@yeeyangtee

Copy link
Copy Markdown

Hi, somehow am getting labels of shape (2, 1, 40, 56, 40) for taskid = 4.

This causes an error with non-matching dimensions between predictions (4) and targets(5).

I'm guessing onehot_y should be = False and need to squeeze labels. Unless some of the decathlon tasks do not have one-hot-labels

@rijobro

rijobro commented Feb 26, 2021

Copy link
Copy Markdown
Contributor

Hi @coranium this seems like a new issue to me. Could you create a new Discussion, preferably with a minimal working example.

Signed-off-by: Yiheng Wang <vennw@nvidia.com>
@yiheng-wang-nv

Copy link
Copy Markdown
Contributor Author

Hi all, I opened a new draft PR, see #131 , since the current tutorial version is too old, which may have many issues, I rewrite a new python file based pipeline, and have tested on all decathlon tasks locally. Since my local version does not have enough doc strings, and used DataParallel rather than DistributedDataParallel for multi-gpu training, to meet the latest MONAI version, the PR is still in processing.
Please take a look at #131 for further updates, thanks!

@wyli

wyli commented Feb 26, 2021

Copy link
Copy Markdown
Contributor

Hi @yiheng-wang-nv do you have an ETA for the new pipeline? if it'll take some time, is it possible to provide a quick fix for #128 first?

@yiheng-wang-nv

yiheng-wang-nv commented Feb 26, 2021

Copy link
Copy Markdown
Contributor Author

Hi @yiheng-wang-nv do you have an ETA for the new pipeline? if it'll take some time, is it possible to provide a quick fix for #128 first?

I see, let me reopen this PR, and create another one to distinguish the new pipeline. The new pipeline will be finished next week.

@yiheng-wang-nv

Copy link
Copy Markdown
Contributor Author

@yiheng-wang-nv thanks! Do you think you could add some comments explaining the shape of the tensor returned by forward? I'm guessing it's the torch.unbind that removes the feature maps? Could you add a comment to that affect, and mention that it's only necessary when deep_supervision==True?

Hi @rijobro , I've added the comments, could you please help to review it again? As for the new pipeline I mentioned above, I'll open another branch and submit a PR after finishing it.

@yiheng-wang-nv yiheng-wang-nv changed the title Update DynUNet Update for DynUNet's changes and fix get_feature_maps issue Feb 26, 2021

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks it looks good to me

@rijobro

rijobro commented Feb 26, 2021

Copy link
Copy Markdown
Contributor

@yiheng-wang-nv added comments look good, thanks!

@wyli wyli merged commit b670c8d into master Feb 26, 2021
@wyli wyli deleted the 106-update-dynunet branch April 20, 2021 14:17
boneseva pushed a commit to boneseva/MONAI-tutorials that referenced this pull request Apr 21, 2024
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.

DynUNet needs updating for deep_supervision

4 participants