def forward(self, inp, pos1, pos2):
    Len = inp.size(0)
    embd = self.word_emb(inp)
    pos1 = self.pos1_emb(pos1)
    pos2 = self.pos2_emb(pos2)
    embd = torch.cat((embd, pos1, pos2), 2).transpose(1, 2)
    conved = self.conv(embd)
    pooled = self.maxPooling(conved).view(Len, dimC)
    out = self.tanh(pooled)
    return self.dropout(out)
def forward(self, inp, pos1, pos2):
    Len = inp.size(0)
    embd = self.word_emb(inp)
    pos1 = self.pos1_emb(pos1)
    pos2 = self.pos2_emb(pos2)
    embd = torch.cat((embd, pos1, pos2), 2).transpose(1, 2)
    conved = self.conv(embd)
    pooled = self.maxPooling(conved).view(Len, dimC)
    out = self.tanh(pooled)
    return self.dropout(out)