70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3,spotlight/sequence/representations.py,PoolNet,user_representation,#PoolNet#Any#,23

Before Change



        // Average representations, ignoring padding.

        sequence_embedding_sum = (sequence_embeddings
                                  .sum(1)
                                  .view(item_sequences.size()[0], -1))
        non_padding_entries = ((item_sequences != PADDING_IDX)
                               .float()
                               .sum(1)
                               .expand_as(sequence_embedding_sum))

After Change


                               .permute(0, 2, 1))

        // Add a trailing dimension of 1
        sequence_embeddings = (sequence_embeddings
                               .unsqueeze(3))

        // Pad it with zeros from left
        sequence_embeddings = F.pad(sequence_embeddings,
                                    (0, 0, 1, 0))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: PoolNet
Method Name: user_representation


Project Name: OpenNMT/OpenNMT-py
Commit Name: 668c3ef362995c55633fde592354160fec1d1efd
Time: 2019-06-27
Author: dylan.flaute@gmail.com
File Name: onmt/decoders/transformer.py
Class Name: TransformerDecoder
Method Name: forward


Project Name: OpenNMT/OpenNMT-py
Commit Name: 668c3ef362995c55633fde592354160fec1d1efd
Time: 2019-06-27
Author: dylan.flaute@gmail.com
File Name: onmt/encoders/transformer.py
Class Name: TransformerEncoder
Method Name: forward


Project Name: maciejkula/spotlight
Commit Name: 70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3
Time: 2017-07-06
Author: maciej.kula@gmail.com
File Name: spotlight/sequence/representations.py
Class Name: CNNNet
Method Name: user_representation