ecfc31e21d0c30b1f543aacb8619582b60a1bef7,gluoncv/model_zoo/mask_rcnn/rcnn_target.py,MaskTargetGenerator,hybrid_forward,#MaskTargetGenerator#Any#Any#Any#Any#Any#,30

Before Change


                                             self._mask_size, 1.0, sample_ratio=2)
            pooled_mask = pooled_mask.reshape((-3, 0, 0))
            // duplicate to C * (N, MS, MS)
            mask_target = []
            mask_mask = []
            for cid in range(1, self._num_classes + 1):
                // boolean array (N,) -> (N, 1, 1)
                same_cid = (cls_target == cid).reshape((-1, 1, 1))
                // keep orig targets
                mask_target.append(pooled_mask)
                // but mask out the one not belong to this class [N, MS, MS]
                mask_mask.append(F.broadcast_mul(F.ones_like(pooled_mask), same_cid))
            // (C, N, MS, MS) -> (N, C, MS, MS)
            mask_targets.append(F.stack(*mask_target, axis=0).transpose((1, 0, 2, 3)))
            mask_masks.append(F.stack(*mask_mask, axis=0).transpose((1, 0, 2, 3)))

        // B * (N, C, MS, MS) -> (B, N, C, MS, MS)

After Change


            same_cids = same_cids.reshape((-2, 1, 1))

            // (N, MS, MS) -> (C, N, 1, 1) -> (C, N, MS, MS)
            mask_mask = F.broadcast_like(same_cids, pooled_mask, lhs_axes=(2, 3), rhs_axes=(1, 2))

            // (N, MS, MS) -> (C, N, MS, MS)
            mask_target = F.expand_dims(pooled_mask, 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: dmlc/gluon-cv
Commit Name: ecfc31e21d0c30b1f543aacb8619582b60a1bef7
Time: 2019-08-29
Author: spanev@nvidia.com
File Name: gluoncv/model_zoo/mask_rcnn/rcnn_target.py
Class Name: MaskTargetGenerator
Method Name: hybrid_forward


Project Name: GPflow/GPflow
Commit Name: 8259acbe363ecc589103678cc7402c2cf54ea564
Time: 2019-02-22
Author: art.art.v@gmail.com
File Name: gpflow/kernels/statics.py
Class Name: Static
Method Name: K_diag


Project Name: GPflow/GPflow
Commit Name: 8259acbe363ecc589103678cc7402c2cf54ea564
Time: 2019-02-22
Author: art.art.v@gmail.com
File Name: gpflow/kernels/statics.py
Class Name: White
Method Name: K


Project Name: GPflow/GPflow
Commit Name: 48270681afc13081094f7f398a1e194c6b07ba9b
Time: 2018-01-03
Author: dutordoirv@gmail.com
File Name: gpflow/mean_functions.py
Class Name: Zero
Method Name: __call__