324b3a52837f46aac644a31eecfa361d728775de,niftynet/contrib/sampler_pairwise/sampler_pairwise.py,PairwiseSampler,get_pairwise_inputs,#PairwiseSampler#Any#,66

Before Change


        images = [fixed_image, fixed_label, moving_image, moving_label]
        images = np.concatenate(images, axis=-1)
        images_shape = np.asarray(images.shape).T.astype(np.int32)
        return images, images_shape

    def _get_image(self, image_source_type, image_id):
        // returns a random image from either the list of fixed images
        // or the list of moving images

After Change


        fixed_inputs = []
        fixed_inputs.append(self._get_image("fixed_image", image_id)[0])
        fixed_inputs.append(self._get_image("fixed_label", image_id)[0])
        fixed_inputs = np.concatenate(fixed_inputs, axis=-1)
        fixed_shape = np.asarray(fixed_inputs.shape).T.astype(np.int32)

        // fetch moving image
        moving_inputs = []
        moving_inputs.append(self._get_image("moving_image", image_id)[0])
        moving_inputs.append(self._get_image("moving_label", image_id)[0])
        moving_inputs = np.concatenate(moving_inputs, axis=-1)
        moving_shape = np.asarray(moving_inputs.shape).T.astype(np.int32)

        return fixed_inputs, moving_inputs, fixed_shape, moving_shape

    def _get_image(self, image_source_type, image_id):
        // returns a random image from either the list of fixed images
        // or the list of moving images
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: NifTK/NiftyNet
Commit Name: 324b3a52837f46aac644a31eecfa361d728775de
Time: 2017-12-21
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/contrib/sampler_pairwise/sampler_pairwise.py
Class Name: PairwiseSampler
Method Name: get_pairwise_inputs


Project Name: dmlc/gluon-nlp
Commit Name: 8e84bd1c5a4cd0e61ee67abc532ab692e5335914
Time: 2020-12-10
Author: xshiab@connect.ust.hk
File Name: src/gluonnlp/attention_cell.py
Class Name:
Method Name: masked_softmax


Project Name: chainer/chainercv
Commit Name: de158b4e37667172f0bf618fde5098739564acba
Time: 2018-05-25
Author: Hakuyume@users.noreply.github.com
File Name: tests/links_tests/model_tests/yolo_tests/test_yolo_base.py
Class Name: DummyYOLO
Method Name: __call__