055c61d73514d471158ee36b83762802c8d4e3d4,lib/loss/clipped_weighted_huber_loss.py,ClippedWeightedHuberLoss,forward,#ClippedWeightedHuberLoss#Any#,22

Before Change


        mask = y > (self.delta ** 2)
        y -= mask * xp.square(abs(self.diff) - self.delta)
        y *= 0.5
        return xp.array(y.sum() / y.dtype.type(y.size), dtype=y.dtype),

    def backward(self, inputs, gy):
        xp = cuda.get_array_module(*inputs)

After Change


        xp.square(diff, out=diff)
        y = (y - diff) * 0.5

        return y.mean(),

    def backward(self, inputs, grad_outputs):
        xp = cuda.get_array_module(*inputs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tsurumeso/waifu2x-chainer
Commit Name: 055c61d73514d471158ee36b83762802c8d4e3d4
Time: 2018-07-14
Author: tsurumeso@gmail.com
File Name: lib/loss/clipped_weighted_huber_loss.py
Class Name: ClippedWeightedHuberLoss
Method Name: forward


Project Name: keras-team/keras
Commit Name: 4a9f551a7a532c744dcb0fa90699ca3262d10bc0
Time: 2017-10-02
Author: ozabluda@gmail.com
File Name: examples/mnist_siamese_graph.py
Class Name:
Method Name: compute_accuracy


Project Name: catalyst-team/catalyst
Commit Name: f4beaac559e00a3676d942dc7e8fea69efc01cfe
Time: 2020-11-30
Author: raveforlive@gmail.com
File Name: catalyst/metrics/hitrate.py
Class Name:
Method Name: hitrate