e2cf1e4f51b9e10056fb79bdefd3de769131a8cc,hypergan/configurable_component.py,ConfigurableComponent,layer_avg_pool,#ConfigurableComponent#Any#Any#Any#,424

Before Change



    def layer_avg_pool(self, net, args, options):

        options = hc.Config(options)
        stride=options.stride or self.ops.shape(net)[1]
        stride=int(stride)
        ksize = [1,stride,stride,1]

        if options.slice:
            size = [int(x) for x in options.slice.replace("batch_size",str(self.gan.batch_size())).split("*")]
            net = tf.slice(net, [0,0,0,0], size)
        net = tf.nn.avg_pool(net, ksize=ksize, strides=ksize, padding="SAME")

        return net 

    def layer_combine_features(self, net, args, options):
        op = None

After Change


        self.current_height //= 2
        self.current_width //= 2
        self.current_input_size = self.current_channels * self.current_width * self.current_height
        return nn.AdaptiveAvgPool2d([self.current_height, self.current_width])

    def layer_combine_features(self, net, args, options):
        op = None
        if(len(args) > 0):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: HyperGAN/HyperGAN
Commit Name: e2cf1e4f51b9e10056fb79bdefd3de769131a8cc
Time: 2020-02-09
Author: martyn@255bits.com
File Name: hypergan/configurable_component.py
Class Name: ConfigurableComponent
Method Name: layer_avg_pool


Project Name: ray-project/ray
Commit Name: 76450c8d4777f12188203e8303d7fd7eb499210c
Time: 2020-05-28
Author: smtp.pdames@gmail.com
File Name: python/ray/autoscaler/aws/config.py
Class Name:
Method Name: _client


Project Name: ray-project/ray
Commit Name: 76450c8d4777f12188203e8303d7fd7eb499210c
Time: 2020-05-28
Author: smtp.pdames@gmail.com
File Name: python/ray/autoscaler/aws/config.py
Class Name:
Method Name: _resource