GAN in fastai

I am trying to implement a basic GAN in fastai. I have working pytorch code that I am looking to port over and implement in fastai. I do not get an error or a stack trace, but the model trains to a solid black image when I try in fastai. I have tried many things over many hours and tried researching, but am not making much headway. I am hoping someone can help point me in the right direction!

I wish I could give more insight as to what the problem is, but I honestly have no clue. I don’t really need go figure out defining a super strict implementation that matches every detail, just something where I change out the loss functions and model and trains to get me started.

Gist of Working Pytorch GAN:https://gist.github.com/Isaac-Flath/0f4023aeab94b1fc01404644aac77d54
Gist of latest non-working fastai GAN: https://gist.github.com/Isaac-Flath/34099dedfa451555bac064fa86f46462

3 Likes