bc51dbc0c56f68ed30857755026633f78eef1ae8,spotlight/layers.py,BloomEmbedding,forward,#BloomEmbedding#Any#,171
Before Change
masked_indices = Variable(masked_indices)
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)):
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()
indices = indices.data.view(batch_size * seq_size, 1)
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: OpenNMT/OpenNMT-py
Commit Name: 809d0e5b52561fefd3b0d98c08d3cbb175d7e706
Time: 2017-07-04
Author: sasha.rush@gmail.com
File Name: onmt/Models.py
Class Name: Encoder
Method Name: forward
Project Name: catalyst-team/catalyst
Commit Name: f4beaac559e00a3676d942dc7e8fea69efc01cfe
Time: 2020-11-30
Author: raveforlive@gmail.com
File Name: catalyst/metrics/avg_precision.py
Class Name:
Method Name: mean_avg_precision