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

Before Change


            tf.round(sample_coords), in_spatial_size)
        batch_ids = tf.reshape(
            tf.range(batch_size), [batch_size] + [1] * (out_spatial_rank + 1))
        batch_ids = tf.tile(batch_ids, [1] + out_spatial_size + [1])
        output = tf.gather_nd(
            inputs, tf.concat([batch_ids, spatial_coords], -1))

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: 4

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: tensorflow/magenta
Commit Name: c47f40414140f71f49aa26e7378e8103d77afd38
Time: 2018-01-04
Author: adarob@google.com
File Name: magenta/models/music_vae/lstm_models.py
Class Name: HierarchicalMultiOutLstmDecoder
Method Name: _hierarchical_decode


Project Name: NifTK/NiftyNet
Commit Name: be296bdca43479c3e6155444a0c171bed4b3398c
Time: 2017-10-31
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/contrib/sampler_pairwise/sampler_pairwise.py
Class Name: PairwiseSampler
Method Name: layer_op