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

Before Change


        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


        if indices.dim() == 2:
            batch_size, seq_size = indices.size()
        else:
            batch_size, seq_size = indices.size(0), 1

        if not indices.is_contiguous():
            indices = indices.contiguous()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: BindsNET/bindsnet
Commit Name: 5895434c8e31e7a446c70aeea5529a59d8054f50
Time: 2018-07-26
Author: djsaunde@umass.edu
File Name: bindsnet/evaluation/__init__.py
Class Name:
Method Name: update_ngram_scores


Project Name: cornellius-gp/gpytorch
Commit Name: f7a1a77baf9102cbd20971c8edba71c4adad33d6
Time: 2017-11-05
Author: gpleiss@gmail.com
File Name: gpytorch/__init__.py
Class Name:
Method Name: monte_carlo_log_likelihood