545f756090e142412e40589c8c30ad58baade744,utils/utils.py,,build_targets,#Any#Any#Any#Any#Any#,234

Before Change


    returns nT, nCorrect, tx, ty, tw, th, tconf, tcls
    
    nB = len(target)  // number of images in batch
    nT = [len(x) for x in target]
    txy = torch.zeros(nB, nA, nG, nG, 2)  // batch size, anchors, grid size
    twh = torch.zeros(nB, nA, nG, nG, 2)
    tconf = torch.ByteTensor(nB, nA, nG, nG).fill_(0)
    tcls = torch.ByteTensor(nB, nA, nG, nG, nC).fill_(0)  // nC = number of classes

After Change


            // Unique anchor selection
            u = torch.stack((gi, gj, a), 0)[:, iou_order]
            // _, first_unique = np.unique(u, axis=1, return_index=True)  // first unique indices
            first_unique = return_torch_unique_index(u, torch.unique(u, dim=1))  // torch alternative

            i = iou_order[first_unique]
            // best anchor must share significant commonality (iou) with target
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: ultralytics/yolov3
Commit Name: 545f756090e142412e40589c8c30ad58baade744
Time: 2019-02-28
Author: glenn.jocher@ultralytics.com
File Name: utils/utils.py
Class Name:
Method Name: build_targets


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 374ca541aaf62aba88a144acbbc7398ca3e995ef
Time: 2018-11-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/ordinal.py
Class Name: OrdinalEncoder
Method Name: ordinal_encoding


Project Name: suavecode/SUAVE
Commit Name: e73418dbc43053ccb522e94e9846de1c88667b73
Time: 2017-04-01
Author: ebotero@stanford.edu
File Name: trunk/SUAVE/Components/Energy/Networks/Propulsor_Surrogate.py
Class Name: Propulsor_Surrogate
Method Name: build_surrogate