534c4dc7423681faab78d1829c1ec3c31ffb8330,niftynet/layer/resampler.py,ResamplerLayer,_resample_inv_dst_weighting,#ResamplerLayer#,319

Before Change


            samples = []
            for img in batch_inputs:
                for knot in batch_knots:
                    samples.append(tf.gather_nd(img, knot))
        samples = tf.stack(samples, axis=1)
        // weighted average over N neighbours
        return tf.reduce_sum(

After Change


            samples = [tf.gather_nd(img, knot)
                       for (img, knot) in zip(batch_inputs, batch_knots)]
        elif n_coords == 1 and batch_size > 1:
            samples = [tf.gather_nd(img, batch_knots[0])
                       for img in batch_inputs]
        else:
            raise NotImplementedError
        samples = tf.stack(samples, axis=1)
        // weighted average over N neighbours
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NifTK/NiftyNet
Commit Name: 534c4dc7423681faab78d1829c1ec3c31ffb8330
Time: 2018-01-30
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/resampler.py
Class Name: ResamplerLayer
Method Name: _resample_inv_dst_weighting


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


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