this is the forward function which returns 50 scores. I have BATCH_SIZE = 50
 def forward(self, xA, xB):
        ## input  (batch,seq_len)
        b_sizeA = xA.size(0)
        b_sizeB = xB.size(0)
        
        xA=xA.t()
        xB=xB.t()
        embeddedA = self.embedding(xA) 
        embeddedB = self.embedding(xB) # S*B x I (embedding size)
        # Again b*s*i
        embeddedA = embeddedA.permute(1,0,2) 
        embeddedB = embeddedB.permute(1,0,2) 
    
        # 3D -> 4D
        embeddedA = embeddedA.unsqueeze(1)
        embeddedB = embeddedB.unsqueeze(1)
        
        xA = self.activation(self.convA1(embeddedA))   
        xB = self.activation(self.convB1(embeddedB))

        xA=embeddedA * xA.expand_as(embeddedA)
        xB=embeddedB * xB.expand_as(embeddedB)

        xA=torch.cat((embeddedA,xA),dim=3)
        xB=torch.cat((embeddedB,xB),dim=3)
        
        xA = xA.squeeze(1) # batch, seq-length, embed size 
        xB = xB.squeeze(1) 

        hA = Variable(torch.ones(self.num_layers * self.number_dir, 
                            b_sizeA, self.hidden_sizeA))
        cA = Variable(torch.ones(self.num_layers * self.number_dir, 
                             b_sizeA, self.hidden_sizeA))
        
        hB = Variable(torch.ones(self.num_layers * self.number_dir, 
                            b_sizeB, self.hidden_sizeB))
        cB = Variable(torch.ones(self.num_layers * self.number_dir, 
                            b_sizeB, self.hidden_sizeB))

        outputA, (hn_A, cn_A) = self.rnnA(xA, (hA, cA)) 
        outputB, (hn_B, cn_B) = self.rnnB(xB, (hB, cB)) 

        cos_sim_list=self.cosinesim(hn_A,hn_B)

        return cos_sim_list.float()