c5023bafe075db2d1deb891816212f5bf297316e,niftynet/layer/crf.py,,permutohedral_compute,#,99

Before Change


        order = range(nCh,-1,-1) if reverse else range(nCh+1)
        for dit in order:
            with tf.control_dependencies([blurred[-1]]):
                b1=0.5*tf.gather(blurred[-1],blurNeighbours1[dit])
                b2=blurred[-1][1:,:,:]
                b3=0.5*tf.gather(blurred[-1],blurNeighbours2[dit])
                blurred.append(tf.concat([blurred[-1][0:1,:,:], b2+b1+b3],0))

After Change


        order = range(n_ch, -1, -1) if reverse else range(n_ch + 1)
        for dit in order:
            with tf.control_dependencies([blurred[-1]]):
                b1 = tf.gather(blurred[-1], blur_neighbours1[dit])
                b2 = blurred[-1][1:, :, :]
                b3 = tf.gather(blurred[-1], blur_neighbours2[dit])
                blurred.append(tf.concat(
                    [blurred[-1][0:1, :, :], b2 + 0.5 * (b1 + b3)], 0))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: NifTK/NiftyNet
Commit Name: c5023bafe075db2d1deb891816212f5bf297316e
Time: 2018-07-21
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/crf.py
Class Name:
Method Name: permutohedral_compute


Project Name: catalyst-team/catalyst
Commit Name: c27dbde9ccec2920f3825538aff07e8533e086ba
Time: 2019-07-24
Author: scitator@gmail.com
File Name: catalyst/rl/offpolicy/algorithms/dqn.py
Class Name: DQN
Method Name: _base_loss