5b36f836715758d83733531ad2253775b476a764,chainercv/links/ssd/ssd.py,SSD,_suppress,#SSD#Any#Any#,112

Before Change


        score = list()
        for i in range(1, 1 + self.n_class):
            mask = raw_score[:, i] >= self.score_threshold
            bbox_label, score_label = raw_bbox[mask], raw_score[mask][:, i]

            if self.nms_threshold is not None:
                order = xp.array(chainer.cuda.to_cpu(
                    score_label).argsort()[::-1])

After Change


        xp = self.xp

        raw_bbox = chainer.cuda.to_cpu(raw_bbox)
        raw_score = chainer.cuda.to_cpu(raw_score)

        bbox = list()
        label = list()
        score = list()
        for i in range(1, 1 + self.n_class):
            mask = raw_score[:, i] >= self.score_threshold
            bbox_label = raw_bbox[mask]
            score_label = raw_score[mask, i]

            if self.nms_threshold is not None:
                order = score_label.argsort()[::-1]
                bbox_label, score_label = bbox_label[order], score_label[order]
                bbox_label, param = transforms.non_maximum_suppression(
                    bbox_label, self.nms_threshold, return_param=True)
                score_label = score_label[param["selection"]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: chainer/chainercv
Commit Name: 5b36f836715758d83733531ad2253775b476a764
Time: 2017-05-08
Author: Hakuyume@users.noreply.github.com
File Name: chainercv/links/ssd/ssd.py
Class Name: SSD
Method Name: _suppress


Project Name: chainer/chainerrl
Commit Name: 67d13b4ba91b23ad29f660aae68a01ddbd809530
Time: 2018-10-16
Author: muupan@gmail.com
File Name: chainerrl/agents/ppo.py
Class Name: PPO
Method Name: act


Project Name: chainer/chainerrl
Commit Name: 67d13b4ba91b23ad29f660aae68a01ddbd809530
Time: 2018-10-16
Author: muupan@gmail.com
File Name: chainerrl/agents/ppo.py
Class Name: PPO
Method Name: act_and_train