74475cddbe3defe8be72abd1d98940475809646d,scripts/detection/ssd/train_ssd.py,,train,#Any#Any#Any#Any#Any#,94

Before Change


                            anchors, cls_preds, gt_boxes, gt_ids)
                        num_positive.append(nd.sum(cls_targets > 0).asscalar())
                        valid_cls = nd.sum(cls_targets >= 0, axis=0, exclude=True)
                        valid_cls = nd.maximum(valid_cls, nd.ones_like(valid_cls))
                        // valid_box = nd.sum(box_masks > 0, axis=0, exclude=True)

                    l1 = cls_loss(cls_preds, cls_targets, (cls_targets >= 0).expand_dims(axis=-1))
                    // losses3.append(l1 * cls_targets.size / cls_targets.shape[0])

After Change


                    box_labels.append(box_targets)
                    // losses1.append(l1 * batch_size)
                    // losses2.append(l2 * batch_size)
                n_pos = max(1, sum(num_positive))
                for l3, l4 in zip(losses3, losses4):
                    L = l3 / n_pos + l4 / n_pos
                    Ls.append(L)
                    losses1.append(l3 / n_pos * batch_size)
                    losses2.append(l4 / n_pos * batch_size)
                autograd.backward(Ls)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/gluon-cv
Commit Name: 74475cddbe3defe8be72abd1d98940475809646d
Time: 2018-04-09
Author: cheungchih@gmail.com
File Name: scripts/detection/ssd/train_ssd.py
Class Name:
Method Name: train


Project Name: dmlc/gluon-cv
Commit Name: d1f4a9f474c547b099aa67619f7ba035a9f8ffbc
Time: 2018-04-07
Author: cheungchih@gmail.com
File Name: scripts/detection/ssd/train_ssd.py
Class Name:
Method Name: train


Project Name: scipy/scipy
Commit Name: c8426fe3f2e6d8073fa8bdbd2f53f62e4df1051f
Time: 2015-07-28
Author: n59_ru@hotmail.com
File Name: scipy/optimize/_lsq_dogbox.py
Class Name:
Method Name: dogbox