34d424e83d246ca7485cf2b952787db06d47cfac,hypergan/train_hooks/experimental/rolling_memory_train_hook.py,RollingMemoryTrainHook,__init__,#RollingMemoryTrainHook#Any#Any#Any#Any#,20

Before Change


                self.mg_loss = gan.create_component(gan.config.loss, discriminator=self.mg_discriminator)
                self.loss[0] += (self.config.lam or 1.0) * self.mg_loss.sample[0]
                self.loss[1] += (self.config.lam or 1.0) * self.mg_loss.sample[1]
                self.gan.add_metric("roll_loss_mg/mx_d", self.loss[0])
            elif _type == "x/mx": 
                self.mg_discriminator = gan.create_component(gan.config.discriminator, name="discriminator", input=tf.concat([self.mg, self.gan.generator.sample],axis=0), features=[gan.features], reuse=True)
                self.mg_loss = gan.create_component(gan.config.loss, discriminator=self.mg_discriminator)
                self.loss[0] += (self.config.lam or 1.0) * self.mg_loss.sample[0]

After Change


        elif _type == "mx/mg": 
            self.loss[0] += (self.config.lam or 1.0) * self.m_loss.sample[0]
            self.loss[1] += (self.config.lam or 1.0) * self.m_loss.sample[1]
            self.gan.add_metric("roll_loss_mx/mg", self.loss[0])
        elif _type == "mg/mx": 
            self.mg_discriminator = gan.create_component(gan.config.discriminator, name="discriminator", input=tf.concat([self.mg, self.gan.generator.sample],axis=0), features=[gan.features], reuse=True)
            self.mg_loss = gan.create_component(gan.config.loss, discriminator=self.mg_discriminator)
            self.loss[0] += (self.config.lam or 1.0) * self.mg_loss.sample[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: 34d424e83d246ca7485cf2b952787db06d47cfac
Time: 2019-08-28
Author: mikkel@255bits.com
File Name: hypergan/train_hooks/experimental/rolling_memory_train_hook.py
Class Name: RollingMemoryTrainHook
Method Name: __init__


Project Name: HyperGAN/HyperGAN
Commit Name: bc204660895cfb44af3325c7f4b64a86b4907ab6
Time: 2020-06-29
Author: mikkel@255bits.com
File Name: hypergan/train_hooks/adversarial_norm_train_hook.py
Class Name: AdversarialNormTrainHook
Method Name: forward


Project Name: HyperGAN/HyperGAN
Commit Name: f615c3f0b75779595d9dcda73bdc8e0fcfce7107
Time: 2018-12-19
Author: mikkel@255bits.com
File Name: hypergan/optimizers/giga_wolf_optimizer.py
Class Name: GigaWolfOptimizer
Method Name: apply_gradients