Open DushyantSahoo opened 2 years ago
Maybe you can convert the cifar10 data set to png format images and store them in a file, and then train according to the author's second method
Maybe you can convert the cifar10 data set to png format images and store them in a file, and then train according to the author's second method
And how to solve the problem with the fact that there is a separate folder for each class? I unpacked the dataset into png, but when I try to teach the model I get an error: Value error: num_samples should be a positive integer, but got num_samples=0. This indicates that model can't read the dataset. I hoped that turning cifar10 into png will help with this problem but it didn't
Hi, did you solve this problem?
Hi, did you solve this problem?
@Allencheng97
Yes, I forked this repo and changed torch.Dataset() to torch.CIFAR10() (line ~~ 721-719)
Hi, did you solve this problem?
@Allencheng97
Yes, I forked this repo and changed torch.Dataset() to torch.CIFAR10() (line ~~ 721-719) Thanks!
I have found what caused it. You should set amp to False when training on cifar10. When I did this, the model can converge and generate normal pictures instead of a bunch of random colours.
I have found what caused it. You should set amp to False when training on cifar10. When I did this, the model can converge and generate normal pictures instead of a bunch of random colours.
Would it be possible to share your code? I'm having some issues getting my version to actually converge, despite also using cifar10. Thanks!
I have found what caused it. You should set amp to False when training on cifar10. When I did this, the model can converge and generate normal pictures instead of a bunch of random colours.
Would it be possible to share your code? I'm having some issues getting my version to actually converge, despite also using cifar10. Thanks!
Hi, is your problem resolved? I am facing a similar issue
My use case for this library was slightly different than its original purpose... My version is considerably modified. My version does resolve the issue relating to training on CIFAR-10, although how much value its modifications will be to you may vary.
You can check out my repository at DevJake/EEG-diffusion-pytorch. Let me know if it's of use!
Hi, did you solve this problem?
@Allencheng97
Yes, I forked this repo and changed torch.Dataset() to torch.CIFAR10() (line ~~ 721-719)
Yes, your method is effective, I heard from my lab that converting images to png format for training is a bit accuracy-damaging
I wonder why that is... I would've figured the subtle compression applied by JPG format would cause potential data loss and thus losses in performance. Equally, it might act as a form of very low-level image augmentation by adding in artefacts. Got anything more on your findings? I'd be interested to know how it was determined
https://github.com/lucidrains/denoising-diffusion-pytorch/issues/57#issuecomment-1220196043
I face same problem with ffhq, fixed when setting amp=False. But why?@greens007
@LangdonYu how should I modify it specifically, I did not find torch.Dataset() in 721 in the denoising_diffusion_pytorch.py file. Thanks!
@LangdonYu how should I modify it specifically, I did not find torch.Dataset() in 721 in the denoising_diffusion_pytorch.py file. Thanks!
Did you solve this problem?
Hi,
I am trying to train and sample using CIFAR 10 dataset. Below is the code for it.
I modified Trainer such that it could take the dataset. The original Trainer had the below code
which I modified to
The training error in the above case goes to inf after 20k iterations. If I stop before that and sample from it, the images are bunch of random colors. Is there any script which I can use to generate samples from CIFAR10?
Thank You