365476b4f61a226f0b48a81c7a582b1488831c3b,src/modules.py,SimplePairEncoder,forward,#SimplePairEncoder#Any#Any#Any#Any#,139
Before Change
def forward(self, s1, s2, s1_mask, s2_mask):
See above
sent_emb1 = s1.max(dim=1)[0]
sent_emb2 = s2.max(dim=1)[0]
return torch.cat([sent_emb1, sent_emb2, torch.abs(sent_emb1 - sent_emb2),
sent_emb1 * sent_emb2], 1)
After Change
def forward(self, s1, s2, s1_mask, s2_mask):
See above
sent_emb1 = combine_hidden_states(s1, s1_mask, self.combine_method)
sent_emb2 = combine_hidden_states(s2, s2_mask, self.combine_method)
return torch.cat([sent_emb1, sent_emb2, torch.abs(sent_emb1 - sent_emb2),
sent_emb1 * sent_emb2], 1)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: jsalt18-sentence-repl/jiant
Commit Name: 365476b4f61a226f0b48a81c7a582b1488831c3b
Time: 2018-06-24
Author: wang.alex.c@gmail.com
File Name: src/modules.py
Class Name: SimplePairEncoder
Method Name: forward
Project Name: jsalt18-sentence-repl/jiant
Commit Name: 365476b4f61a226f0b48a81c7a582b1488831c3b
Time: 2018-06-24
Author: wang.alex.c@gmail.com
File Name: src/modules.py
Class Name: AttnPairEncoder
Method Name: forward
Project Name: jsalt18-sentence-repl/jiant
Commit Name: 365476b4f61a226f0b48a81c7a582b1488831c3b
Time: 2018-06-24
Author: wang.alex.c@gmail.com
File Name: src/models.py
Class Name: MultiTaskModel
Method Name: _single_classification_forward