edf96731ef964481a23d7c0bbeb0790ce1a7419d,hypergan/distributions/uniform_distribution.py,UniformDistribution,__init__,#UniformDistribution#Any#Any#,12

Before Change


        self.current_channels = config["z"]
        self.current_input_size = config["z"]
        batch_size = gan.batch_size()
        self.z = torch.Tensor(batch_size, self.current_input_size).cuda()
        if self.config.projections is not None:
            self.current_input_size *= len(self.config.projections)
            self.current_channels *= len(self.config.projections)

After Change


        self.current_input_size = config["z"]
        batch_size = gan.batch_size()
        self.shape = [batch_size, self.current_input_size]
        self.const_two = torch.Tensor([2]).cuda()
        self.const_one = torch.Tensor([1]).cuda()
        if self.config.projections is not None:
            self.current_input_size *= len(self.config.projections)
            self.current_channels *= len(self.config.projections)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: edf96731ef964481a23d7c0bbeb0790ce1a7419d
Time: 2020-07-11
Author: martyn@255bits.com
File Name: hypergan/distributions/uniform_distribution.py
Class Name: UniformDistribution
Method Name: __init__


Project Name: yhenon/pytorch-retinanet
Commit Name: b6443232013e8d248fe26f59630d43bc9688df06
Time: 2018-04-29
Author: yannhenon@gmail.com
File Name: losses.py
Class Name:
Method Name: loss


Project Name: AllenCellModeling/pytorch_fnet
Commit Name: ba30f0665150fe300e34be8117108f1fdd8fadbd
Time: 2017-06-19
Author: chek.o@outlook.com
File Name: models.py
Class Name: Model
Method Name: predict