c8f075268f7e5645a77eef21591a62a07e7e8baa,hypergan/trainers/sgd_trainer.py,,run,#Any#,40

Before Change



    // in WGAN paper, values are clipped.  This might not work, and is slow.
    if(config.clipped_discriminator):
        clip = [tf.assign(d,tf.clip_by_value(d, -config.clip_value, config.clip_value))  for d in d_vars]
        sess.run(clip)

    if(d_class_loss is not None):
        _, g_cost,d_fake,d_real,d_class = sess.run([g_optimizer, g_loss, d_fake_loss, d_real_loss, d_class_loss])
        //print("%2d: g cost %.2f d_loss %.2f d_real %.2f d_class %.2f d_log %.2f" % (iteration, g_cost,d_cost, d_real, d_class, d_log ))

After Change



    // in WGAN paper, values are clipped.  This might not work, and is slow.
    if(config.d_clipped_weights):
        sess.run(gan.graph.clip)

    if(d_class_loss is not None):
        _, g_cost,d_fake,d_real,d_class = sess.run([g_optimizer, g_loss, d_fake_loss, d_real_loss, d_class_loss])
        //print("%2d: g cost %.2f d_loss %.2f d_real %.2f d_class %.2f d_log %.2f" % (iteration, g_cost,d_cost, d_real, d_class, d_log ))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: c8f075268f7e5645a77eef21591a62a07e7e8baa
Time: 2017-02-28
Author: mikkel@255bits.com
File Name: hypergan/trainers/sgd_trainer.py
Class Name:
Method Name: run


Project Name: HyperGAN/HyperGAN
Commit Name: 9c8dc8d6eb3208d8d442311853ca5859b0ac04aa
Time: 2017-02-21
Author: mikkel@255bits.com
File Name: hypergan/trainers/adam_trainer.py
Class Name:
Method Name: run


Project Name: ray-project/ray
Commit Name: 460c2757a3a954f4de8812381bf83b86ecc07ec3
Time: 2021-03-03
Author: antoine@foobot.io
File Name: python/ray/experimental/tf_utils.py
Class Name: TensorFlowVariables
Method Name: set_weights