35d9aa8a6d11ac5c30d0be81ed3b1be9ce503ec1,hypergan/trainers/fitness_trainer.py,FitnessTrainer,_create,#FitnessTrainer#,32

Before Change



        if config.g_ema_decay is not None:
            decay2 = config.g_ema_decay
            pg_vars = [tf.zeros_like(v) for v in g_vars]
            self.pg_vars = pg_vars
            self.g_vars = g_vars
            g_emas = [tf.assign(v, (decay2*pv+(1.0-decay2)*v)) for v, pv in zip(g_vars, pg_vars)]
            self.g_ema = tf.group(g_emas)

After Change


            print("DECAY", decay)
            return tf.assign(v, v*(1-decay)+pastv*decay)
        self.assign_ema = tf.group([_ema(a,b) for a,b in zip(allvars, self.past_weights)])
        self.assign_past_weights = tf.group([tf.assign(b,a) for a,b in zip(allvars, self.past_weights)])

        self.g_loss = g_loss
        self.d_loss = d_loss
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: 35d9aa8a6d11ac5c30d0be81ed3b1be9ce503ec1
Time: 2018-07-31
Author: mikkel@255bits.com
File Name: hypergan/trainers/fitness_trainer.py
Class Name: FitnessTrainer
Method Name: _create


Project Name: HyperGAN/HyperGAN
Commit Name: 35d9aa8a6d11ac5c30d0be81ed3b1be9ce503ec1
Time: 2018-07-31
Author: mikkel@255bits.com
File Name: hypergan/trainers/fitness_trainer.py
Class Name: FitnessTrainer
Method Name: _create


Project Name: MorvanZhou/tutorials
Commit Name: 45a1d730e78a711132dbf16e856c32e5711d7f12
Time: 2017-02-21
Author: morvanzhou@hotmail.com
File Name: Reinforcement_learning_TUT/5_Deep_Q_Network/RL_brain.py
Class Name: DeepQNetwork
Method Name: _replace_target_params


Project Name: MorvanZhou/tutorials
Commit Name: 45a1d730e78a711132dbf16e856c32e5711d7f12
Time: 2017-02-21
Author: morvanzhou@hotmail.com
File Name: Reinforcement_learning_TUT/6_OpenAI_gym/RL_brain.py
Class Name: DeepQNetwork
Method Name: _replace_target_params