Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the consistency term should operate on the instance data rather than on the batch data? #6

Open
ctc53 opened this issue May 5, 2020 · 0 comments

Comments

@ctc53
Copy link

ctc53 commented May 5, 2020

Hi, I wonder if this code snippet is an issue:
"CT_ = tf.reduce_mean(CT_)" operates on the batch data.
Is it proper to change it to "CT_ = tf.reduce_mean(CT_)[0]" to operate on the first instance.

https://github.com/biuyq/CT-GAN/blob/master/CT-GANs/tensorflow_generative_model/CT_gan_cifar_resnet.py
#consistency term
CT = LAMBDA_2tf.square(disc_real-disc_real_)
CT += LAMBDA_2
0.1tf.reduce_mean(tf.square(disc_real_2-disc_real_2_),reduction_indices=[1])
CT_ = tf.maximum(CT-Factor_M,0.0
(CT-Factor_M))
CT_ = tf.reduce_mean(CT_) <-----
disc_costs.append(CT_)
disc_costs.append(gradient_penalty)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant