e49dbd02c177843b023d3104b9596bd47440c308,niftynet/layer/resampler.py,ResamplerLayer,_resample_linear,#ResamplerLayer#Any#Any#,82

Before Change


            f_1 = _pyramid_combination(samples[1::2], w_0[:-1], w_1[:-1])
            return f_0 * w_1[-1] + f_1 * w_0[-1]

        binary_neighbour_ids = [
            [int(c) for c in format(i, "0%ib" % in_spatial_rank)]
            for i in range(2 ** in_spatial_rank)]
        samples = [get_knot(bc) for bc in binary_neighbour_ids]
        return _pyramid_combination(samples, weight_0, weight_1)

    def _resample_bspline(self, inputs, sample_coords):

After Change


        batch_ids = tf.reshape(
            tf.range(batch_size), [batch_size] + [1] * out_spatial_rank)
        batch_ids = tf.tile(batch_ids, [1] + out_spatial_size)
        sc = (tf.cast(floor_coords, COORDINATES_TYPE),
              tf.cast(ceil_coords, COORDINATES_TYPE))

        def get_knot(bc):
            coord = [sc[c][i] for i, c in enumerate(bc)]
            coord = tf.stack([batch_ids] + coord, -1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: NifTK/NiftyNet
Commit Name: e49dbd02c177843b023d3104b9596bd47440c308
Time: 2017-10-31
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/resampler.py
Class Name: ResamplerLayer
Method Name: _resample_linear


Project Name: explosion/thinc
Commit Name: 9334d336f027e8b90d5751458c7794f8a0167559
Time: 2020-05-11
Author: justin@dujardinconsulting.com
File Name: thinc/shims/mxnet.py
Class Name: MXNetShim
Method Name: finish_update


Project Name: facebookresearch/Horizon
Commit Name: 674ecfb9db45ff2f65088ef4662401f29cb3a8ad
Time: 2019-07-07
Author: jjg@fb.com
File Name: ml/rl/workflow/preprocess_handler.py
Class Name: ContinuousPreprocessHandler
Method Name: preprocess