@KarthikR
This is how I am comparing true and predicted labels-
num_corrects = (torch.max(predictions_batch, 1)[1].view(target.size()).data == target.data).float().sum()

This is the last layer-
 h = self.fc(self.dropout(h))

I am saving the model with the best validation accuracy and then using that model for classifying single sentences.