cd48957b671f2799c19578f73025da50dd100de5,lib/model/rpn/rpn.py,_RPN,forward,#_RPN#Any#Any#Any#Any#,58

Before Change



            fg_cnt = 0
            self.rpn_loss_cls = 0
            for i in range(batch_size):
                rpn_keep = rpn_label[i].ne(-1).nonzero().squeeze()
                rpn_keep_v = Variable(rpn_keep)
                rpn_cls_score_single = torch.index_select(rpn_cls_score[i], 0, rpn_keep_v)
                rpn_label_tmp = torch.index_select(rpn_label[i], 0, rpn_keep)
                rpn_label_v = Variable(rpn_label_tmp.long())

                fg_cnt += torch.sum(rpn_label_v.data.ne(0))

                self.rpn_loss_cls += F.cross_entropy(rpn_cls_score_single, rpn_label_v)

            self.rpn_loss_cls /= batch_size

            rpn_bbox_targets, rpn_bbox_inside_weights, rpn_bbox_outside_weights = rpn_data[1:]

After Change



            rpn_keep = Variable(rpn_label.view(-1).ne(-1).nonzero().view(-1))
            rpn_cls_score = torch.index_select(rpn_cls_score.view(-1,2), 0, rpn_keep)
            rpn_label = torch.index_select(rpn_label.view(-1), 0, rpn_keep.data)
            rpn_label = Variable(rpn_label.long())
            self.rpn_loss_cls = F.cross_entropy(rpn_cls_score, rpn_label)
            fg_cnt = torch.sum(rpn_label.data.ne(0))

            rpn_bbox_targets, rpn_bbox_inside_weights, rpn_bbox_outside_weights = rpn_data[1:]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: cd48957b671f2799c19578f73025da50dd100de5
Time: 2017-09-05
Author: jlu347@jarvis.cc.gatech.edu
File Name: lib/model/rpn/rpn.py
Class Name: _RPN
Method Name: forward


Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/utils/cholesky.py
Class Name:
Method Name: batch_potrf


Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: gpytorch/utils/cholesky.py
Class Name:
Method Name: batch_potrs


Project Name: jwyang/faster-rcnn.pytorch
Commit Name: cd48957b671f2799c19578f73025da50dd100de5
Time: 2017-09-05
Author: jlu347@jarvis.cc.gatech.edu
File Name: lib/model/rpn/rpn.py
Class Name: _RPN
Method Name: forward