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

Before Change


            samples = [tf.gather_nd(img, knot)
                       for (img, knot) in zip(batch_inputs, batch_knots)]
        else:
            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(
            samples * tf.expand_dims(point_weights, axis=-1), axis=0)

After Change


        if batch_size == n_coords:
            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: 5

Non-data size: 8

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: ClimbsRocks/auto_ml
Commit Name: d17d1bd4867cfadbf6f2fb1d276f79a1a65a3255
Time: 2016-12-12
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils_scoring.py
Class Name: ClassificationScorer
Method Name: score


Project Name: GPflow/GPflow
Commit Name: 0d97bc0bb3db40017f1278d6c1f292ea0f789ab0
Time: 2020-03-27
Author: art.art.v@gmail.com
File Name: gpflow/optimizers/mcmc.py
Class Name: SamplingHelper
Method Name: __init__


Project Name: allenai/allennlp
Commit Name: 5ad7a33a04d8829ad3439b5f9390bd136105f986
Time: 2020-05-28
Author: tobiasr@allenai.org
File Name: allennlp/nn/beam_search.py
Class Name: BeamSearch
Method Name: search


Project Name: AKSHAYUBHAT/DeepVideoAnalytics
Commit Name: 4220efc634021812eba44cdd97e914ec026b0e7a
Time: 2017-08-26
Author: akshayubhat@gmail.com
File Name: dvalib/retriever.py
Class Name: BaseRetriever
Method Name: nearest