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

Before Change



        sequence_embeddings = self.item_embeddings(item_sequences)

        (batch_size, seq_len, dim) = sequence_embeddings.size()

        // Move embedding dimensions to channels and add a fourth dim.
        sequence_embeddings = (sequence_embeddings
                               .permute(0, 2, 1)

After Change


        for i, cnn_layer in enumerate(self.cnn_layers):
            // Pad so that the CNN doesn"t have the future
            // of the sequence in its receptive field.
            x = F.pad(x, (0, 0, self.kernel_width - min(i, 1), 0))
            x = F.relu(cnn_layer(x))

        x = x.squeeze(3)

        return x[:, :, :-1], x[:, :, -1]

    def forward(self, user_representations, targets):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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


Project Name: rusty1s/pytorch_geometric
Commit Name: 5ffa38fca42bb3fbee030f4b80264e0f4910a49c
Time: 2018-01-16
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/utils/tu_format.py
Class Name:
Method Name: read_adj


Project Name: open-mmlab/mmdetection
Commit Name: a6236b789b8f4e2e66c8379199f40ecef9afce06
Time: 2020-04-21
Author: 40779233+ZwwWayne@users.noreply.github.com
File Name: mmdet/core/anchor/anchor_generator.py
Class Name: AnchorGenerator
Method Name: valid_flags