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

Issue when I try to use nnUNet to other model #2197

Open
chenzhang9476 opened this issue May 17, 2024 · 5 comments
Open

Issue when I try to use nnUNet to other model #2197

chenzhang9476 opened this issue May 17, 2024 · 5 comments
Assignees

Comments

@chenzhang9476
Copy link

Hi, all.

I know this isn't your obligation, but just wanna post and see if any of you tried to do similar thing like me before.
I'm trying to use nnUNet framework with Swin-Unet, which is transformer-based network. This is what i encountered.
image
As you can see, all the loss become a and pseudo dice is nan, this seems cannot be modified, I tried several times.
I simple put Swin-Unet under build_network_architecture function (but only used when training, converting data is still unet framework, otherwise cannot success.)

Thank for any advice.

@FabianIsensee FabianIsensee self-assigned this May 17, 2024
@FabianIsensee
Copy link
Member

Hey, let me tag @TaWald and @saikat-roy here since they have the most experience with this kind of stuff. My 2 cents:

  • nnU-Net default initial LR is way too high for those architectures
  • you may want to use AdamW instead of SGD here

Best,
Fabian

@saikat-roy
Copy link
Member

Hey @chenzhang9476. Just following up on @FabianIsensee here. In our experience, when we trained SwinUNet using nnUNet as the training framework, we had to reduce the learning rate to 1e-4. We did use AdamW as the optimizer instead of SGD. But my guess is that, you would probably need to reduce the learning rate on SGD as well.

@chenzhang9476
Copy link
Author

chenzhang9476 commented May 28, 2024 via email

@saikat-roy
Copy link
Member

Hey @chenzhang9476 . Can you clarify what you mean by confused? Are you trying to switch off deep supervision or are you trying to use it but are unsuccessful?

@chenzhang9476
Copy link
Author

Is deep supervision compliable with the other new framework like Swin-Unet?

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

No branches or pull requests

3 participants