6b48055fdfe3c628833ed26ca394ef2fb1d97f82,niftynet/layer/resampler.py,ResamplerLayer,_resample_nearest,#ResamplerLayer#Any#Any#,58

Before Change


        batch_size = in_size[0]
        in_spatial_size = in_size[1:-1]

        out_size = sample_coords.get_shape().as_list()
        out_spatial_size = out_size[1:-1]
        out_spatial_rank = infer_spatial_rank(sample_coords)

        spatial_coords = self.boundary_func(
            tf.round(sample_coords), in_spatial_size)

After Change


        spatial_coords = self.boundary_func(
            tf.round(sample_coords), in_spatial_size)
        output = tf.stack([
            tf.gather_nd(img, coords) for (img, coords) in
            zip(tf.unstack(inputs), tf.unstack(spatial_coords))])

        if self.boundary == "ZERO":
            scale = 1. / (tf.constant(in_spatial_size, dtype=tf.float32) - 1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: NifTK/NiftyNet
Commit Name: 6b48055fdfe3c628833ed26ca394ef2fb1d97f82
Time: 2017-10-26
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/resampler.py
Class Name: ResamplerLayer
Method Name: _resample_nearest


Project Name: dhlab-epfl/dhSegment
Commit Name: 69f6cb1e25e014952b409cd906e319415c43e1d0
Time: 2017-10-23
Author: seg.benoit@gmail.com
File Name: doc_seg/utils.py
Class Name:
Method Name: multiclass_to_label_image


Project Name: asyml/texar
Commit Name: c572ec4e20ce24417e25e2ee27af820e76ee20f8
Time: 2017-11-26
Author: zhitinghu@gmail.com
File Name: txtgen/modules/connectors/connectors.py
Class Name:
Method Name: _mlp_transform