Project-MONAI / tutorials

MONAI Tutorials
https://monai.io/started.html
Apache License 2.0
1.85k stars 682 forks source link

fix bug varautoencoder_mednist.ipynb #1626

Closed clead6 closed 9 months ago

clead6 commented 9 months ago

Bug in VAE tutorial, indexing of the data dictionaries train_datadict[:10] and test_datadict[:10] had been left there.

Description

In a previous commit, someone left indexes on the data dictionaries train_datadict[:10] and test_datadict[:10] to debug. I removed them so the code properly runs on the whole dataset.

Checks

review-notebook-app[bot] commented 9 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sembelawi commented 9 months ago

modules/engines/unet_training_dict.py

I am currently using the above tutorial for supervised training. Unfortunately, the early stopping handler is triggered right at the beginning. I am receiving the following below feedback and I could not identify where the bug is. Thanks in progress!

2024-02-03 10:44:10,219 ignite.handlers.early_stopping.EarlyStopping INFO: EarlyStopping: Stop training 2024-02-03 10:44:10,220 - INFO - Epoch: 1/100, Iter: 21/3264 -- train_loss: 1.0000

KumoLiu commented 9 months ago

Hi @Sembelawi, the reason is that your loss didn't decrease after the patience. You can either set up larger patience or check your data. https://github.com/Project-MONAI/MONAI/blob/33afaefff925dce45b8331e8290f234a4d95fd51/monai/handlers/earlystop_handler.py#L37