23cb7909a0bf0355115ef870779cb286b14ca319,gluoncv/model_zoo/rpn/rpn_target.py,RPNTargetGenerator,forward,#RPNTargetGenerator#Any#Any#Any#Any#,131

Before Change


            // mask out invalid anchors, (N, 4)
            a_xmin, a_ymin, a_xmax, a_ymax = F.split(anchor, num_outputs=4, axis=-1)
            invalid_mask = (a_xmin < 0) + (a_ymin < 0) + (a_xmax >= width) + (a_ymax >= height)
            invalid_mask = F.repeat(invalid_mask, repeats=bbox.shape[0], axis=-1)
            ious = F.where(invalid_mask, mx.nd.ones_like(ious) * -1, ious)

            samples, matches = self._sampler(ious)

After Change


                np.expand_dims(samples, axis=0), np.expand_dims(matches, axis=0),
                np.expand_dims(anchor.asnumpy(), axis=0), np.expand_dims(bbox.asnumpy(), axis=0))
        return mx.nd.array(cls_target, ctx=bbox.context), \
               mx.nd.array(box_target[0], ctx=bbox.context), \
               mx.nd.array(box_mask[0], ctx=bbox.context)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/gluon-cv
Commit Name: 23cb7909a0bf0355115ef870779cb286b14ca319
Time: 2019-04-12
Author: zhangz6@cs.washington.edu
File Name: gluoncv/model_zoo/rpn/rpn_target.py
Class Name: RPNTargetGenerator
Method Name: forward


Project Name: brian-team/brian2
Commit Name: 0fb01856a291476bd773ab3d00eb11e824d621f6
Time: 2013-10-20
Author: marcel.stimberg@ens.fr
File Name: brian2/groups/poissongroup.py
Class Name: PoissonGroup
Method Name: __init__


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 122c24b4aeb11ecba5f77c3bf5ef8f20f2167c77
Time: 2018-06-07
Author: eriklindernoren@gmail.com
File Name: utils/datasets.py
Class Name: ListDataset
Method Name: __getitem__