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

Before Change



        user_representations, (hidden, cell) = self.lstm(sequence_embeddings)

        return hidden.view(-1, self.embedding_dim)

        return user_representations[:, -1, :]

        return user_representations

After Change


        sequence_embeddings = (self.item_embeddings(item_sequences)
                               .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))
                               .squeeze(3))
        sequence_embeddings = sequence_embeddings.permute(0, 2, 1)

        user_representations, _ = self.lstm(sequence_embeddings)
        user_representations = user_representations.permute(0, 2, 1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: LSTMNet
Method Name: user_representation


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


Project Name: cornellius-gp/gpytorch
Commit Name: fa6163650ac882cf343f63f0cab852878342281e
Time: 2018-07-23
Author: gpleiss@gmail.com
File Name: gpytorch/kernels/index_kernel.py
Class Name: IndexKernel
Method Name: forward