ba675a4894fbf3df2257c3815bc591c770c7470c,deeppavlov/core/layers/tf_layers.py,,cudnn_gru,#Any#Any#Any#Any#Any#Any#Any#Any#,498

Before Change


            indices = tf.stack([tf.range(tf.shape(h)[0]), seq_lengths], axis=1)
            h_last = tf.gather_nd(h, indices)
        else:
            h_last = tf.squeeze(h_last, 0)
        return h, h_last


def cudnn_lstm(units, n_hidden, n_layers=1, trainable_initial_states=None, seq_lengths=None, initial_h=None, initial_c=None,

After Change



        h, h_last = gru(tf.transpose(units, (1, 0, 2)), (initial_h, ))
        h = tf.transpose(h, (1, 0, 2))
        h_last = tf.reshape(h_last, shape=(-1, n_hidden))

        // Extract last states if they are provided
        if seq_lengths is not None:
            indices = tf.stack([tf.range(tf.shape(h)[0]), seq_lengths], axis=1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: ba675a4894fbf3df2257c3815bc591c770c7470c
Time: 2018-08-06
Author: yurakuratov@gmail.com
File Name: deeppavlov/core/layers/tf_layers.py
Class Name:
Method Name: cudnn_gru


Project Name: deepmipt/DeepPavlov
Commit Name: ba675a4894fbf3df2257c3815bc591c770c7470c
Time: 2018-08-06
Author: yurakuratov@gmail.com
File Name: deeppavlov/core/layers/tf_layers.py
Class Name:
Method Name: cudnn_lstm


Project Name: NifTK/NiftyNet
Commit Name: 269fe541986a4711eda1d707c86d97da0558564d
Time: 2018-05-10
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/contrib/dataset_sampler/image_window_dataset.py
Class Name: ImageWindowDataset
Method Name: layer_op