Repository navigation
Some layers in DiffusionModelUNet are detached and zeroed #8702
Replies: 1 comment
|
It's deliberate, not a bug — and a zero output from a freshly built model is the expected behaviour.
So if you just constructed the model and ran a forward pass without training, an all-zero output is exactly what the initialisation produces. If you're seeing zeros after training, or after loading a checkpoint, that's a different problem — check that training actually ran or that the weights loaded (e.g. print |
Uh oh!
There was an error while loading. Please reload this page.
Hi folks,
I am encountering the output of Unet model from DiffusionModelUNet being a zero tensor no matter what input I feed into it. Therefore, I look into the source code of the model and found that the convolution of the final layer of the residual block of UNet is a zero module (
MONAI/monai/networks/nets/diffusion_model_unet.py
Line 393 in 57fdd59
Also, the output convolution of UNet itself is a zero module too (
MONAI/monai/networks/nets/diffusion_model_unet.py
Line 1720 in 57fdd59
Could you please explain why zeroing out these layers, which makes the overal UNet output to be zero. This is quite counterintuitive to me.
Thank you in advanced!
All reactions