05db9a67c8ec2fe3bc14993b6fc215e336e9d56a,hypergan/train_hooks/experimental/rolling_memory_train_hook.py,RollingMemoryTrainHook,__init__,#RollingMemoryTrainHook#Any#Any#Any#Any#,20

Before Change


        self._lambda = self.gan.configurable_param(config["lambda"])
    else:
        self._lambda = 1.0
    self.mx=tf.Variable(tf.zeros_like(self.gan.inputs.x))
    self.mg=tf.Variable(tf.zeros_like(self.gan.inputs.x))
    self._vlambda = self.gan.configurable_param(config.vlambda or 1.0)
    self.m_discriminator = gan.create_component(gan.config.discriminator, name="discriminator", input=tf.concat([self.mx, self.mg],axis=0), features=[gan.features], reuse=True)

After Change


  def __init__(self, gan=None, config=None, trainer=None, name="RollingMemoryTrainHook"):
    super().__init__(config=config, gan=gan, trainer=trainer, name=name)
    config = hc.Config(config)
    s = self.gan.ops.shape(self.gan.inputs.x)
    self.shape = [self.gan.batch_size() * (self.config.memory_size or 1), s[1], s[2], s[3]]
    self.mx=tf.Variable(tf.zeros(self.shape))
    self.mg=tf.Variable(tf.zeros(self.shape))
    self.m_discriminator = gan.create_component(gan.config.discriminator, name="discriminator", input=tf.concat([self.mx, self.mg],axis=0), features=[gan.features], reuse=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


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


Project Name: XifengGuo/CapsNet-Keras
Commit Name: 68cf00a7a0b6ce367861403cab69ec9f43a2645f
Time: 2017-11-23
Author: guoxifeng1990@163.com
File Name: capsulelayers.py
Class Name: CapsuleLayer
Method Name: call


Project Name: tensorflow/ranking
Commit Name: 2c6d3465e31921b581aedfa118c397ac5b3b24dd
Time: 2020-02-05
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/model.py
Class Name:
Method Name: _rolling_window_indices