bac11303e2776b57b730d4ffb5d41bc5ce34b079,mmdet/core/anchor/anchor_target.py,,anchor_target_single,#Any#Any#Any#Any#Any#Any#Any#,74

Before Change


    bbox_targets = torch.zeros_like(anchors)
    bbox_weights = torch.zeros_like(anchors)
    labels = torch.zeros_like(assigned_gt_inds)
    label_weights = torch.zeros_like(assigned_gt_inds, dtype=anchors.dtype)

    if len(pos_inds) > 0:
        pos_anchors = anchors[pos_inds, :]
        pos_gt_bbox = gt_bboxes[assigned_gt_inds[pos_inds] - 1, :]

After Change


    num_valid_anchors = anchors.shape[0]
    bbox_targets = torch.zeros_like(anchors)
    bbox_weights = torch.zeros_like(anchors)
    labels = anchors.new_zeros((num_valid_anchors, ))
    label_weights = anchors.new_zeros((num_valid_anchors, ))

    pos_inds = sampling_result.pos_inds
    neg_inds = sampling_result.neg_inds
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: open-mmlab/mmdetection
Commit Name: bac11303e2776b57b730d4ffb5d41bc5ce34b079
Time: 2018-10-17
Author: chenkaidev@gmail.com
File Name: mmdet/core/anchor/anchor_target.py
Class Name:
Method Name: anchor_target_single


Project Name: pytorch/fairseq
Commit Name: 27568a7ebed1a35f08ac0390f35b3de9b8dad0dd
Time: 2019-11-13
Author: myleott@fb.com
File Name: fairseq/models/levenshtein_transformer.py
Class Name: LevenshteinTransformerModel
Method Name: initialize_output_tokens