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

Before Change


                               .unsqueeze(3))

        x = sequence_embeddings
        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



        // 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: 4

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: explosion/thinc
Commit Name: d6d7cb7db51776b026514a1a2caa4073b9e998ad
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: list2padded


Project Name: explosion/thinc
Commit Name: d6d7cb7db51776b026514a1a2caa4073b9e998ad
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/jax_ops.py
Class Name: JaxOps
Method Name: list2padded