bc51dbc0c56f68ed30857755026633f78eef1ae8,spotlight/layers.py,BloomEmbedding,forward,#BloomEmbedding#Any#,171

Before Change


        if masked_indices.dim() == 2:
            embedding = self.embeddings(masked_indices).mean(1)
        else:
            embedding = self.embeddings(masked_indices[:, :, 0])

            for idx in range(1, len(self._masks)):
                embedding += self.embeddings(masked_indices[:, :, idx])

            embedding /= len(self._masks)

        return embedding

After Change


        masked_indices = Variable(masked_indices)

        embedding = self.embeddings(masked_indices)
        embedding = embedding.sum(1)
        embedding = embedding.view(batch_size, seq_size, -1)

        return embedding
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: maciejkula/spotlight
Commit Name: bc51dbc0c56f68ed30857755026633f78eef1ae8
Time: 2017-08-20
Author: maciej.kula@gmail.com
File Name: spotlight/layers.py
Class Name: BloomEmbedding
Method Name: forward


Project Name: CellProfiler/CellProfiler
Commit Name: c5913dff8cf140ef93dc40de8c5cad6d792a6a55
Time: 2010-07-20
Author: leek@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/modules/colortogray.py
Class Name: ColorToGray
Method Name: run_combine


Project Name: SheffieldML/GPy
Commit Name: adfa6de1d87baced85215985da9ed2ce671c2a93
Time: 2013-03-27
Author: james.hensman@gmail.com
File Name: GPy/kern/rbf.py
Class Name: rbf
Method Name: _K_computations