My training is failing. Is it because of insufficient data?

Hello !
New to tensorflow, I’m a french digital artist that recently started to work on/with AI !

I’m trying to train a DCGAN from a small batch of images I created using Stable Diffusion.
I followed the DCGAN tutorial on and customized it to use my dataset. I have 40 images and I know that is not enough to produce a robust model, but I just wanted to see if I could make it work on a small scale first. Plus, my goal is not to have a really viable model, just to experiment and try to do a little bit of interpolation animation with it.

I can get my model to train, but it seems to repeatedly collapse. Even after 500 epochs, I only get a yellowish noise. It sometimes even look like it’s starting to produce something, but then it becomes all yellow again. Here is a gif of one of my last training:

My question is: am I doomed to fail with such a small dataset, or is it a question of badly setup discriminator? Is there a way I can still get some results without resorting to producing hundred of thousands of images ?

My code is here:

Thanks !

Hi @Arthur_Kuhn, Welcome to the Tensorflow Forum!

The 40 images seem to be too low for the model training, so the model was not able to learn from that, it is suggested to increase the dataset. Thank You.

Hi @Kiran_Sai_Ramineni , thanks for your answer !

I’ve generated new images and rretried with 160, it definitely was an improvement, but the model still collapsed in the end. I’ll keep on augmenting the dataset to find the viable minimum.

Speaking of that, I was wondering about data augmentation ?
I followed the tutorial for it, but it doesn’t seem to be applicable in my case. I don’t think putting the augmentation steps as keras layers in either of my models (discriminator or generator) would be useful, right ? I also tried writing a third model that takes care of that and putting my dataset through it (sorry if wrong terminology) before anything else, but then it becomes a Sequential object, and I got the following error when calling the training itself:

TypeError: ‘Sequential’ object is not iterable

Is there a way around this that would help me augmenting my data ?

Thanks again !

Hi @Arthur_Kuhn, Could you please provide a stand alone code to reproduce the issue. Thank You.