ikostrikov / TensorFlow-VAE-GAN-DRAW

A collection of generative methods implemented with TensorFlow (Deep Convolutional Generative Adversarial Networks (DCGAN), Variational Autoencoder (VAE) and DRAW: A Recurrent Neural Network For Image Generation).
Apache License 2.0
595 stars 167 forks source link

Loss Function #4

Closed wieschoo closed 7 years ago

wieschoo commented 8 years ago

Hi,

good work @ikostrikov ! I just wonder where the loss function: https://github.com/ikostrikov/TensorFlow-VAE-GAN-DRAW/blob/master/main-gan.py#L60-L61 comes from? Because it does not look like a cross entropy loss cross

I hope you do not mind my way of asking here.

ikostrikov commented 8 years ago

Hi!

Thanks!

D1 and D2 have fixed labels there there was no need to write them down explicitly. Then, I took a more numerically stable formulation from: https://www.tensorflow.org/versions/r0.7/api_docs/python/nn.html#sigmoid_cross_entropy_with_logits

Yes, sure. No problem.