zoubohao / DenoisingDiffusionProbabilityModel-ddpm-

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.
MIT License
1.48k stars 156 forks source link

loss can't converge #5

Closed GritLs closed 1 year ago

GritLs commented 1 year ago

I want to ask what is a reasonable value for the loss ?
I have run 160 epoches, but loss still can't converge, and I really want to kown a reasonable value for final loss.

zoubohao commented 1 year ago

You can produce the images using the weight you trained. I do not know what your thoughts on convergence are, but the Net has indeed converged.

GritLs commented 1 year ago

Sorry to bother you, but I wonder if we can judge wether the net coverges by the value of loss.
Because the loss in 170th epoch is not significantly different from that at begining. Like this:
....
100%|██████████| 625/625 [03:20<00:00, 3.12it/s, epoch=4, loss: =6.78, img shape: =torch.Size([80, 3, 32, 32]), LR=0.00012]
100%|██████████| 625/625 [03:20<00:00, 3.12it/s, epoch=5, loss: =8.38, img shape: =torch.Size([80, 3, 32, 32]), LR=0.000125]
····
100%|██████████| 625/625 [03:21<00:00, 3.11it/s, epoch=168, loss: =6.01, img shape: =torch.Size([80, 3, 32, 32]), LR=3.27e-5]
100%|██████████| 625/625 [03:21<00:00, 3.10it/s, epoch=169, loss: =9.78, img shape: =torch.Size([80, 3, 32, 32]), LR=3.15e-5]
100%|██████████| 625/625 [03:21<00:00, 3.10it/s, epoch=170, loss: =6.75, img shape: =torch.Size([80, 3, 32, 32]), LR=3.04e-5]

Thank you very much : )

GritLs commented 1 year ago

it worked ! thank you!

Wuziyi616 commented 1 year ago

@GritLs sorry to bother you, but what's a reasonable loss value you finally got? I'm working on another dataset, and want to use this as a reference. Thank you in advance!