This may be the simplest implement of DDPM. You can directly run Main.py to train the UNet on CIFAR-10 dataset and see the amazing process of denoising.
why ues this to generate a noise (saveNoisy = torch.clamp(noisyImage 0.5 + 0.5, 0, 1))
is this 0.5 necessray?
and also in this function(sampledImgs = sampledImgs 0.5 + 0.5 # [0 ~ 1])
why ues this to generate a noise (saveNoisy = torch.clamp(noisyImage 0.5 + 0.5, 0, 1)) is this 0.5 necessray? and also in this function(sampledImgs = sampledImgs 0.5 + 0.5 # [0 ~ 1])