135a56e0935fbb04811f8ce7b9f514f498212f71,niftynet/layer/crf.py,,ftheta,#Any#Any#Any#Any#Any#Any#,148

Before Change



    // Message Passing
    data = tf.reshape(tf.nn.softmax(H1), [batch_size, -1, n_ch])
    Q1 = [None] * len(permutohedrals)
    with tf.device("/cpu:0"):
        for idx, permutohedral in enumerate(permutohedrals):
            Q1[idx] = tf.reshape(

After Change


    n_voxels = np.prod(U.shape.as_list()[:-1])

    H1 = tf.reshape(tf.nn.softmax(H1), [batch_size, -1, n_ch])
    Q1 = 0
    for idx, permutohedral in enumerate(permutohedrals):
        // Message Passing
        Q = _permutohedral_gen(permutohedral, H1, name + str(idx))
        Q.set_shape([n_voxels, n_ch])
        // Weighting Filtered Outputs
        Q1 = Q1 + Q * kernel_weights[idx]

    // Compatibility Transform, Adding Unary Potentials
    // output logits, not the softmax
    return U - tf.reshape(tf.matmul(Q1, mu), U.shape.as_list())


def permutohedral_prepare(position_vectors):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NifTK/NiftyNet
Commit Name: 135a56e0935fbb04811f8ce7b9f514f498212f71
Time: 2018-07-25
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/crf.py
Class Name:
Method Name: ftheta


Project Name: GPflow/GPflow
Commit Name: d1ac7b831ad36cd0e4bdd7980819f83208345148
Time: 2018-02-07
Author: alex.ialongo@gmail.com
File Name: gpflow/expectations.py
Class Name:
Method Name: _expectation


Project Name: tensorlayer/tensorlayer
Commit Name: d3bdc5449964423387861c78edd9d890a81a5466
Time: 2019-03-31
Author: jingqing.zhang15@imperial.ac.uk
File Name: tests/layers/test_layers_recurrent.py
Class Name: Layer_RNN_Test
Method Name: setUpClass