Add AAPD for XML_CNN (#160)

* Add AAPD for XMLCNN

* Add kwargs for XML
This commit is contained in:
Ashutosh-Adhikari
2018-11-09 20:53:43 -05:00
committed by Ralph Tang
parent addc4506d1
commit 97bdaec5bb
3 changed files with 23 additions and 37 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ class XmlCNN(nn.Module):
def forward(self, x):
def forward(self, x, **kwargs):
if self.mode == 'rand':
word_input = self.embed(x) # (batch, sent_len, embed_dim)
x = word_input.unsqueeze(1) # (batch, channel_input, sent_len, embed_dim)