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))

        if self.boundary == "ZERO":
            scale = 1. / (tf.constant(in_spatial_size, dtype=tf.float32) - 1)
            mask = tf.logical_and(

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: tensorflow/tpu
Commit Name: b6437e4dd115c5b290eb84b0620610b497293609
Time: 2020-05-12
Author: pengchong@google.com
File Name: models/official/detection/serving/inputs.py
Class Name:
Method Name: raw_image_tensor_input


Project Name: tensorflow/tpu
Commit Name: dca76ad8ebe547f400682f09e27d497254905d1d
Time: 2020-06-15
Author: pengchong@google.com
File Name: models/official/detection/serving/inputs.py
Class Name:
Method Name: raw_image_tensor_input