cvlab-stonybrook / SelfMedMAE

Code for ISBI 2023 paper "Self Pre-training with Masked Autoencoders for Medical Image Classification and Segmentation"
Apache License 2.0
112 stars 12 forks source link

Very Dark Input? #10

Open slefcourt27 opened 7 months ago

slefcourt27 commented 7 months ago

Hi,

Quick question - when looking at the visualizations generated, I notice that sometimes the input is very dark / black. If you zoom in closely, it's apparent that the underlying data (BTCV) is the same. Did this happen to you and is there an explanation for this? In my case, this occurred on the first epoch. This also happens over time once the loss has been NaN for several tens or hundreds of epochs.

Any help is appreciated!

image

Dmitvna commented 6 months ago

Have you solved this problem yet? I have encountered the same problem, only a few visualization images are normal, and the rest are all completely black.

slefcourt27 commented 6 months ago

I did, there were some places where torch.cuda.amp or the torch.autocast was used. Once I removed that it solved it for the most part.