-
Notifications
You must be signed in to change notification settings - Fork 973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running on CIFAR 10 #57
Comments
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? |
Yes, I forked this repo and changed torch.Dataset() to torch.CIFAR10() (line ~~ 721-719) |
|
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! |
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 |
I face same problem with ffhq, fixed when setting amp=False. |
@LangdonYu |
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
The text was updated successfully, but these errors were encountered: