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
diff = xp.abs(self.diff)
y = xp.square(diff)
diff -= diff.dtype.type(self.delta)
xp.maximum(diff, 0, dtype=diff.dtype, out=diff)
xp.square(diff, out=diff)
y = (y - diff) * 0.5
In pattern: SUPERPATTERN
Frequency: 4
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: facebookresearch/Horizon
Commit Name: d9815f5ee75397f9f75da34e28e7292b98c181d5
Time: 2018-04-12
Author: edoardoc@fb.com
File Name: ml/rl/training/ddpg_trainer.py
Class Name: DDPGTrainer
Method Name: train
Project Name: biolab/orange3
Commit Name: fba0fc9d72e984e73c8ed0de1e57bc37bbe8f676
Time: 2018-03-23
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/statistics/util.py
Class Name:
Method Name: _count_nans_per_row_sparse
Project Name: tensorflow/datasets
Commit Name: 4f7d575fd8aedefc95f0aaa377cd1e498af70759
Time: 2018-12-07
Author: rsepassi@google.com
File Name: tensorflow_datasets/core/features/text/subword_text_encoder.py
Class Name: SubwordTextEncoder
Method Name: __init__