5985d16cc0593601ff04a3bedac17b5e3c3b1b7e,utils/resources/create_inverse_gan_models.py,,build_gan_graph,#Any#Any#Any#,212

Before Change



    // CREATE OPTIMIZERS
    // We only want generator variables to be trained when running the generator and not discriminator variables etc.
    trainable_variables = tf.trainable_variables()
    disc_trainable_vars = [var for var in trainable_variables if var.name.startswith("discriminator")]
    gen_trainable_vars = [var for var in trainable_variables if var.name.startswith("generator")]

    // CREATE OPTIMIZERS
    disc_opt_tf = tf.train.AdamOptimizer(learning_rate, beta1=0.5).minimize(disc_loss_tf, var_list=disc_trainable_vars)
    gen_opt_tf = tf.train.AdamOptimizer(learning_rate, beta1=0.5).minimize(gen_loss, var_list=gen_trainable_vars)

After Change


        )
    )

    disc_loss_fake_tf = tf.reduce_mean(
        tf.nn.sigmoid_cross_entropy_with_logits(
            disc_fake_logits_tf,
            tf.zeros_like(disc_fake_logits_tf)
        )
    )

    disc_loss_tf = (disc_loss_real_tf + disc_loss_fake_tf) / 2.0

    gen_loss = tf.reduce_mean(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 5985d16cc0593601ff04a3bedac17b5e3c3b1b7e
Time: 2020-07-04
Author: kz.takemoto@gmail.com
File Name: utils/resources/create_inverse_gan_models.py
Class Name:
Method Name: build_gan_graph


Project Name: reinforceio/tensorforce
Commit Name: b0fd7d13ff1392c60dfef432bfea7a7dd035f71f
Time: 2017-07-29
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/vpg_model.py
Class Name: VPGModel
Method Name: create_tf_operations


Project Name: reinforceio/tensorforce
Commit Name: b0fd7d13ff1392c60dfef432bfea7a7dd035f71f
Time: 2017-07-29
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/dqfd_model.py
Class Name: DQFDModel
Method Name: create_tf_operations