2d44d66f74c0be1f2952af80cc11a9076fd71e3c,chainercv/links/model/mask_rcnn/mask_head.py,,mask_loss_post,#Any#Any#Any#Any#Any#,275
Before Change
mask_loss = 0
for i in np.unique(cuda.to_cpu(mask_roi_indices)):
index = (mask_roi_indices == i).nonzero()[0]
gt_segm = gt_segms[index]
gt_mask_label = gt_mask_labels[index]
mask_loss += F.sigmoid_cross_entropy(
segms[index, gt_mask_label], gt_segm.astype(np.int32))
After Change
gt_mask_labels = xp.hstack(gt_mask_labels).astype(np.int32)
mask_loss = F.sigmoid_cross_entropy(
segms[np.arange(len(gt_mask_labels)), gt_mask_labels],
gt_segms.astype(np.int32))
return mask_loss
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: chainer/chainercv
Commit Name: 2d44d66f74c0be1f2952af80cc11a9076fd71e3c
Time: 2019-03-04
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/mask_rcnn/mask_head.py
Class Name:
Method Name: mask_loss_post
Project Name: scipy/scipy
Commit Name: f35c4cc54fd9fa0e373127c76028275ce7c588e5
Time: 2020-07-10
Author: keaton.burns@gmail.com
File Name: scipy/sparse/construct.py
Class Name:
Method Name: block_diag
Project Name: pymc-devs/pymc3
Commit Name: d6a2e55cea7640cf6ab1250bbaba66dd79a7ee85
Time: 2017-09-02
Author: maxim.v.kochurov@gmail.com
File Name: pymc3/theanof.py
Class Name: BatchedDiag
Method Name: perform