314f925d0a089d5a44331c95eb2bfefcae1b0bc7,hypergan/samplers/batch_walk_sampler.py,BatchWalkSampler,_sample,#BatchWalkSampler#,29

Before Change



        latent = self.latent2 * self.step / self.step_count + (1.0 - self.step / self.step_count) * self.latent1

        g = gan.generator.forward(latent.cuda().float())
        //    gs.append(g)
        return [
            ("generator", g)

After Change


        if self.step > self.step_count:
            self.latent1 = self.latent2
            direction = self.gan.latent.sample()
            self.direction = direction / torch.norm(direction, p=2, dim=1, keepdim=True).expand_as(direction)
            self.velocity = 10.0
            self.step = 0

        latent = self.direction * self.step / self.step_count * self.velocity + self.latent1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: 314f925d0a089d5a44331c95eb2bfefcae1b0bc7
Time: 2020-02-21
Author: mikkel@255bits.com
File Name: hypergan/samplers/batch_walk_sampler.py
Class Name: BatchWalkSampler
Method Name: _sample


Project Name: OpenNMT/OpenNMT-py
Commit Name: ba164c0dbb3d8171004380956a88431f4e8248ba
Time: 2017-08-01
Author: bpeters@coli.uni-saarland.de
File Name: onmt/Models.py
Class Name: Embeddings
Method Name: make_positional_encodings


Project Name: abhiskk/fast-neural-style
Commit Name: e15bc113b83c2bdf980d2557971888d10011ef29
Time: 2017-03-14
Author: abhishekkadiyan@gmail.com
File Name: neuralstyle/transformernet.py
Class Name: InstanceNormalization
Method Name: forward