mirror of
https://github.com/wassname/Castor.git
synced 2026-09-11 11:51:23 +08:00
Check in MP-CNN Lite Model (#108)
* Add MP-CNN Lite model * MP-CNN Lite bug fixes
This commit is contained in:
+1
-1
@@ -216,7 +216,7 @@ class MPCNN(nn.Module):
|
||||
attention_emb2 = torch.cat((attention_weighted_sent2, sent2), dim=1)
|
||||
return attention_emb1, attention_emb2
|
||||
|
||||
def forward(self, sent1, sent2, ext_feats=None, word_to_doc_count=None, raw_sent1=None, raw_sent2=None, sent1_nonstatic=None, sent2_nonstatic=None):
|
||||
def forward(self, sent1, sent2, ext_feats=None, word_to_doc_count=None, raw_sent1=None, raw_sent2=None):
|
||||
# Attention
|
||||
if self.attention != 'none':
|
||||
sent1, sent2 = self.concat_attention(sent1, sent2, word_to_doc_count, raw_sent1, raw_sent2)
|
||||
|
||||
Reference in New Issue
Block a user