48c1c96ac4cfec5580a5feb7eb7ef7c25c6db234,keras/backend/tensorflow_backend.py,,ctc_label_dense_to_sparse,#,4257

Before Change


                             label_shape)
    label_ind = tf.boolean_mask(label_array, dense_mask)

    batch_array = tf.transpose(tf.reshape(tf.tile(tf.range(label_shape[0]),
                                                  max_num_labels_tns), reverse(label_shape, 0)))
    batch_ind = tf.boolean_mask(batch_array, dense_mask)
    indices = tf.transpose(tf.reshape(concatenate([batch_ind, label_ind], axis=0), [2, -1]))

    vals_sparse = tf.gather_nd(labels, indices)

    return tf.SparseTensor(tf.to_int64(indices), vals_sparse, tf.to_int64(label_shape))

After Change


    label_ind = tf.boolean_mask(label_array, dense_mask)

    tmp = tf.tile(tf.range(label_shape[0]), max_num_labels_tns)
    batch_array = tf.transpose(tf.reshape(tmp, reverse(label_shape, 0)))
    batch_ind = tf.boolean_mask(batch_array, dense_mask)

    indices = concatenate([batch_ind, label_ind], axis=0)
    indices = tf.transpose(tf.reshape(indices, [2, -1]))

    vals_sparse = tf.gather_nd(labels, indices)

    indices = tf.to_int64(indices)
    label_shape = tf.to_int64(label_shape)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 2

Instances


Project Name: keras-team/keras
Commit Name: 48c1c96ac4cfec5580a5feb7eb7ef7c25c6db234
Time: 2018-10-29
Author: gabrieldemarmiesse@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: ctc_label_dense_to_sparse


Project Name: Bihaqo/t3f
Commit Name: 9ff88319e25b2acd1668b08449455ae0c986726e
Time: 2018-10-30
Author: sasha.v.novikov@gmail.com
File Name: t3f/autodiff.py
Class Name:
Method Name: _block_diag_hessian_vector_product


Project Name: DenisTome/Lifting-from-the-Deep-release
Commit Name: 5648ee1938dcb9e531d11a02262901f104216759
Time: 2017-05-12
Author: D.Tome@cs.ucl.ac.uk
File Name: utils/prob_model.py
Class Name: Prob3dPose
Method Name: normalise_data


Project Name: nicola-decao/s-vae-pytorch
Commit Name: 4537298ec78fbf30cd4fe914e9668cd3445373b2
Time: 2018-07-28
Author: nicola.decao@student.uva.nl
File Name: hyperspherical_vae/distributions/von_mises_fisher.py
Class Name: VonMisesFisher
Method Name: rsample


Project Name: nicola-decao/s-vae-pytorch
Commit Name: 3a3916adbe18066f8fdf854ae1c9edbb28103ec3
Time: 2018-07-28
Author: nicola.decao@student.uva.nl
File Name: hyperspherical_vae/distributions/von_mises_fisher.py
Class Name: VonMisesFisher
Method Name: rsample


Project Name: jadore801120/attention-is-all-you-need-pytorch
Commit Name: 33b341d1f8c6397b547f12ae2d5937bf5e2fd1ec
Time: 2018-08-22
Author: yhhuang@nlg.csie.ntu.edu.tw
File Name: transformer/SubLayers.py
Class Name: PositionwiseFeedForward
Method Name: forward