IDEALLab / bezier-gan

Bézier Generative Adversarial Networks
MIT License
37 stars 21 forks source link

Syntetize a single noise #11

Open sarapuccia1 opened 12 months ago

sarapuccia1 commented 12 months ago

Hi everybody I trained the Bazier GAN using the training code given in the folder. I have obtained a good results but as attached synthesized_0 00 I have some issue because I would like to sintetize a singular airfoil but I don't understand how to call the model. Thanks in advanced for your help.

wchen459 commented 12 months ago

You can change points_per_axis = 5 to points_per_axis = 1 in the following line: https://github.com/IDEALLab/bezier-gan/blob/53c0c51a5a984ce8106f05e10976efa0b30d9780/beziergan/train_gan.py#L71C5-L71C21 and run python train_gan.py evaluate <latent dimension> <noise dimension>

In train_gan.py, model.synthesize(1) will give you a randomly synthesized airfoil. Or you can specify the latent and the noise variables by calling model.synthesize(latent, noise). Please see the synthesize method for more information: https://github.com/IDEALLab/bezier-gan/blob/53c0c51a5a984ce8106f05e10976efa0b30d9780/beziergan/gan.py#L352C14-L352C14