senmaoy / RAT-GAN

A conditional GAN for text-to-image
40 stars 10 forks source link

Error when pretraining the DAMSM model ? #19

Closed ghost closed 9 months ago

senmaoy commented 12 months ago

It means that the list of img size is empty, it should be [256]. However, it's hard to directly know why an empty list is fed. Maybe the dataset hyperparameters are not correct.

ghost commented 12 months ago

I just follow the instructions for the bird dataset setup in the DM-GAN repo, I don't know what causing the error. When I printed the imsize, I got [299], is this correct ?

senmaoy commented 12 months ago

It looks like your code is pointing to the second term in [299]. maybe you have set the image resolutions to be [256,128,64] in the code. try to set the image resolution [256]

senmaoy commented 11 months ago

I just follow the instructions for the bird dataset setup in the DM-GAN repo, I don't know what causing the error. When I printed the imsize, I got [299], is this correct ?

DM-GAN is tested by many users, there should be no problem. Hence, I recommend you delete all the code and data. Then clone the code again. Such an operation will avoid many strange errors

ghost commented 11 months ago

I'm actually trying to train the AttnGAN repository instead of the DM-GAN repository. The DM-GAN provides more detailed instructions on setting up the dataset (both repositories have the same dataset setup, but DM-GAN explains it better).

AttnGAN uses Python 2, and PyTorch no longer supports Python 2, even after downgrading. I found another repository that has rewritten the AttnGAN code in Python 3 (it's a pull request in the AttnGAN repo). I haven't made any changes, but when I tried to run it, I encountered the error above. This error has been discussed in the issue section, but there is no solution to fix.

senmaoy commented 11 months ago

emmm, this error should be not that hard to fix. I have a version of a modified version of ATTN with no attention on my machine in python 3. You can try it by yourself.

ghost commented 11 months ago

Thanks for your comment, you are good so it's easy, I'm an idiot so it's very hard to fix the error. Could you share the AttnGAN code so I can try training ? Thanks.