a33253b2e850ded23f4661555d65bd01082ecb55,chainer/functions/math/average.py,Sum,forward,#Sum#Any#,52

Before Change


        x, = inputs
        ret = x.sum(axis=self.axis, keepdims=self.keepdims)
        if backend.get_array_module(x) is numpy:
            ret = numpy.asarray(ret)
        return ret,

    def backward(self, indexes, grad_outputs):
        gy, = grad_outputs

After Change



    def forward(self, inputs):
        x, = inputs
        if self.axis is None:
            self.multiplier = 1.0 / x.size
        else:
            divider = 1
            for axis in self.axis:
                divider *= x.shape[axis]
            self.multiplier = 1.0 / divider
        ret = utils.force_array(
            x.mean(axis=self.axis, keepdims=self.keepdims))
        return ret,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: chainer/chainer
Commit Name: a33253b2e850ded23f4661555d65bd01082ecb55
Time: 2019-07-11
Author: kataoka@preferred.jp
File Name: chainer/functions/math/average.py
Class Name: Sum
Method Name: forward


Project Name: scipy/scipy
Commit Name: 1da24a9e52fd5c3fe19c40607a46a24d891fcf8d
Time: 2014-12-20
Author: gregory.lee@cchmc.org
File Name: scipy/special/basic.py
Class Name:
Method Name: diric


Project Name: hmmlearn/hmmlearn
Commit Name: 79b734c11220707efc720d4998208d0abf7955d8
Time: 2016-08-11
Author: superbobry@gmail.com
File Name: hmmlearn/hmm.py
Class Name: GMMHMM
Method Name: _init_covar_priors