396303a7b84fe4f8b304a5878c487ff0b3a16097,spotlight/sequence/representations.py,CNNNet,user_representation,#CNNNet#,297

Before 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)

After Change


                               .unsqueeze(3))

        receptive_field_width = (self.kernel_width +
                                 (self.kernel_width - 1) *
                                 (self.dilation - 1))

        // Pad so that the CNN doesn"t have the future
        // of the sequence in its receptive field.
        x = F.pad(sequence_embeddings,
                  (0, 0, receptive_field_width, 0))
        x = F.tanh(self.cnn_layers[0](x))

        for cnn_layer in self.cnn_layers[1:]:

            x = F.pad(x, (0, 0, receptive_field_width - 1, 0))
            x = F.tanh(cnn_layer(x))

        x = x.squeeze(3)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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


Project Name: librosa/librosa
Commit Name: 489494cdbbd3bf9f75b37c58e15ffbbbc1dd0188
Time: 2015-01-03
Author: brian.mcfee@nyu.edu
File Name: librosa/util.py
Class Name:
Method Name: fix_length


Project Name: librosa/librosa
Commit Name: 8acf04da9110e1fdb5846c4bf511c8d9f29a6565
Time: 2014-11-06
Author: brian.mcfee@nyu.edu
File Name: librosa/util.py
Class Name:
Method Name: pad_center