15bc4baff9c2dfa2e42947a417e45a159ab50dad,ludwig/models/modules/embedding_modules.py,EmbedSparse,__call__,#EmbedSparse#Any#Any#Any#Any#,287

Before Change


            self.initializer
        )

        multiple_hot_indexes = tf.multiply(
            input_sparse,
            tf.constant(np.array([range(len(self.vocab))], dtype=np.int32))
        )

        idx = tf.where(tf.not_equal(multiple_hot_indexes, 0))

        sparse_multiple_hot_indexes = tf.SparseTensor(
            idx,
            tf.gather_nd(multiple_hot_indexes, idx),
            tf.shape(multiple_hot_indexes, out_type=tf.int64)
        )

After Change



        sparse_multiple_hot_indexes = tf.SparseTensor(
            idx,
            idx[:, 1],
            tf.shape(input_sparse, out_type=tf.int64)
        )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: uber/ludwig
Commit Name: 15bc4baff9c2dfa2e42947a417e45a159ab50dad
Time: 2020-05-14
Author: w4nderlust@gmail.com
File Name: ludwig/models/modules/embedding_modules.py
Class Name: EmbedSparse
Method Name: __call__


Project Name: NifTK/NiftyNet
Commit Name: 0c63b9dcd7ee3da39c74379a01d16e3a360d3506
Time: 2017-10-26
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/resampler.py
Class Name: ResamplerLayer
Method Name: _resample_inv_dst_weighting


Project Name: uber/ludwig
Commit Name: 66866187ee32e7ec2f1e93cbd39a21a0afd1ccd3
Time: 2020-05-09
Author: w4nderlust@gmail.com
File Name: ludwig/models/modules/embedding_modules.py
Class Name: EmbedSparse
Method Name: call