9bf2004b29aa393400bd904bdf788390f5c0404a,niftynet/layer/binary_masking.py,BinaryMaskingLayer,layer_op,#BinaryMaskingLayer#Any#,62

Before Change


                    new_mask = np.zeros(image.shape[0:3], dtype=np.bool)
                    for mod in mod_to_mask:
                        new_mask = np.logical_or(new_mask, mask[..., mod, t])
                    mask[..., t] = np.tile(np.expand_dims(new_mask, axis=-1),
                                           [1, mask.shape[3]])

            if self.multimod_fusion == "and":
                for t in range(0, image.shape[4]):
                    new_mask = np.ones(image.shape[0:3], dtype=np.bool)
                    for mod in mod_to_mask:
                        new_mask = np.logical_and(new_mask, mask[..., mod, t])
                    mask[..., t] = np.tile(np.expand_dims(new_mask, axis=-1),
                                           [1, mask.shape[3]])
            return mask
        raise ValueError("unknown input format")

After Change


                    for mod in mod_to_mask:
                        new_mask = np.logical_or(new_mask, mask[..., t, mod])
                    for mod in mod_to_mask:
                        mask[..., t, mod] = new_mask

            if self.multimod_fusion == "and":
                for t in range(0, image.shape[3]):
                    new_mask = np.ones(image.shape[0:3], dtype=np.bool)
                    for mod in mod_to_mask:
                        new_mask = np.logical_and(new_mask, mask[..., t, mod])
                    for mod in mod_to_mask:
                        mask[..., t, mod] = new_mask
            return mask
        raise ValueError("unknown input format")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: NifTK/NiftyNet
Commit Name: 9bf2004b29aa393400bd904bdf788390f5c0404a
Time: 2017-08-07
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/binary_masking.py
Class Name: BinaryMaskingLayer
Method Name: layer_op


Project Name: NervanaSystems/coach
Commit Name: 39a28aba95b0d8eeb56f7a17b7dad140e601b591
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/value_optimization_agent.py
Class Name: ValueOptimizationAgent
Method Name: tf_input_state


Project Name: NifTK/NiftyNet
Commit Name: 9bf2004b29aa393400bd904bdf788390f5c0404a
Time: 2017-08-07
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/binary_masking.py
Class Name: BinaryMaskingLayer
Method Name: layer_op


Project Name: dmlc/gluon-cv
Commit Name: 9f0b230e1f59cb399e36210483bc075760b02eaf
Time: 2018-04-11
Author: cheungchih@gmail.com
File Name: gluonvision/model_zoo/ssd/ssd.py
Class Name: SSD
Method Name: hybrid_forward