d9172919d00695f0dddb0ab10c89c3b7a8e26427,mmdet/models/losses/ghm_loss.py,GHMR,__init__,#GHMR#Any#Any#Any#Any#,110
Before Change
super(GHMR, self).__init__()
self.mu = mu
self.bins = bins
self.edges = torch.arange(bins + 1).float().cuda() / bins
self.edges[-1] = 1e3
self.momentum = momentum
if momentum > 0:
self.acc_sum = torch.zeros(bins).cuda()
self.loss_weight = loss_weight
// TODO: support reduction parameter
After Change
self.momentum = momentum
if momentum > 0:
acc_sum = torch.zeros(bins)
self.register_buffer("acc_sum", acc_sum)
self.loss_weight = loss_weight
// TODO: support reduction parameter
def forward(self, pred, target, label_weight, avg_factor=None):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: open-mmlab/mmdetection
Commit Name: d9172919d00695f0dddb0ab10c89c3b7a8e26427
Time: 2019-10-23
Author: erotemic@gmail.com
File Name: mmdet/models/losses/ghm_loss.py
Class Name: GHMR
Method Name: __init__
Project Name: open-mmlab/mmdetection
Commit Name: d9172919d00695f0dddb0ab10c89c3b7a8e26427
Time: 2019-10-23
Author: erotemic@gmail.com
File Name: mmdet/models/losses/ghm_loss.py
Class Name: GHMC
Method Name: __init__
Project Name: OpenNMT/OpenNMT-py
Commit Name: b47d8d5b81b5e82c5764c55816303b1c7b1919f8
Time: 2017-09-06
Author: nasa4836@gmail.com
File Name: onmt/modules/Transformer.py
Class Name: TransformerDecoder
Method Name: __init__
Project Name: open-mmlab/mmdetection
Commit Name: d9172919d00695f0dddb0ab10c89c3b7a8e26427
Time: 2019-10-23
Author: erotemic@gmail.com
File Name: mmdet/models/losses/ghm_loss.py
Class Name: GHMR
Method Name: __init__