USING LR REDUCE LR ON PLATEAU #1362
Replies: 4 comments 1 reply
-
Hi @wyli , Could you please help share some info here? I think may need to change the expected metric key in Thanks. |
Beta Was this translation helpful? Give feedback.
-
THE problem is that the trainer is a MONAI trainer not a Ignite trainer and
is training using a dictionary based dataset so I think I have to change
something but I don't know exactly what...
As soon as possible I will share a code chunk with errors....
Il giorno lun 14 dic 2020 alle ore 09:57 Nic Ma <[email protected]>
ha scritto:
… Hi @wyli <https://github.com/wyli> ,
Could you please help share some info here? I think may need to change the
expected metric key in step_transform according to challenge_baseline
notebook.
Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/Project-MONAI/MONAI/issues/1362#issuecomment-744288026>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFCVPF2AYB5B6UIR4AJQD43SUXHQ7ANCNFSM4UYORBLA>
.
|
Beta Was this translation helpful? Give feedback.
-
Sure, please share your code for better debug and analysis. |
Beta Was this translation helpful? Give feedback.
-
https://pytorch.org/docs/stable/optim.html#torch.optim.lr_scheduler.ReduceLROnPlateau This is particularly challenging if you want to use the ignite engines as it seems. When using the You can probably find a workaround for this. The following is just quick and dirty... (monai internal code might have changed):
Probably, the post_transforms option might be another way to save the loss inside the evaluator |
Beta Was this translation helpful? Give feedback.
-
In the file test_handler_lr_scheduler.py :
lr_scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, patience=1)
handler = LrScheduleHandler(lr_scheduler, step_transform=lambda x: val_engine.state.metrics["val_loss"])
In the code of challenge_baseline how to use it? Can anyone explain what to specify in step_transform and output_transform?
evaluator.state.metrics["val_loss"] does not work.
Beta Was this translation helpful? Give feedback.
All reactions