GAN for 1d data?

I am trying to train a model for 1d data that has 500 features.

Unfortunately, since the common implementation of GAN is for image,
I wasn’t able to find a working version of GAN for 1d data.

Does anyone know any public implementation?
Is there anything specific that I have to keep in mind?

I preprocessed the input data to have range of -1 to 1 to match with Tanh() and also tried different activation functions but none seems to give me promising results…

Thank you for the time

I’ve reimplemented a toy example from this blog post a while ago and you can find the code here.
Since this code is quite old by now, you might need to change some details (e.g. swap data[0] for .item()).

1 Like

Thank you so much.
I can try to adapt some of your approaches.

The only thing is that,
when I said 1d, I meant 1xd, where d is number of features.
it seems like your implementation is for generates a single number.

I guess things you should workout without much patching, right?

I hope so. If it’s not that easy and you get stuck somewhere, just let me know and I can try to help out. :wink:

I’ve implemented some basic codes for GANs with plots showing training progress. you can find it here:
https://github.com/mese79/GANs_experiments