70e4d7fe60a9658bb27b9f5fb67592a1222b2ec3,spotlight/sequence/representations.py,CNNNet,user_representation,#CNNNet#Any#,114
Before Change
x = cnn_layer(x)
user_representations = x.view(batch_size, dim, -1)
pooled_representations = (user_representations
.max(-1)[0 ]
.view(batch_size, dim))
return pooled_representations
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):
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: CNNNet
Method Name: user_representation
Project Name: uber/ludwig
Commit Name: dfbe335e866460547f97ed7ed4af0b1ad1b70bcf
Time: 2020-09-05
Author: jimthompson5802@gmail.com
File Name: ludwig/decoders/sequence_decoders.py
Class Name: SequenceGeneratorDecoder
Method Name: decoder_greedy
Project Name: uber/ludwig
Commit Name: dfbe335e866460547f97ed7ed4af0b1ad1b70bcf
Time: 2020-09-05
Author: jimthompson5802@gmail.com
File Name: ludwig/decoders/sequence_decoders.py
Class Name: SequenceGeneratorDecoder
Method Name: decoder_teacher_forcing
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