Loss function of run_classifier.py takes in 2 inputs of different dimensions. 
I am having an error here https://github.com/huggingface/pytorch-pretrained-BERT/blob/master/examples/run_classifier.py#L836

In this line, `loss = loss_fct(logits.view(-1, num_labels), label_ids.view(-1))`, suppose we have 2 labels (entailment vs. not_entailment like QNLI task), then, 

`logits` is already in dimension batch_size x num_labels. Using `logits.view(-1, num_labels)` will convert logits into an array of length (2 times batch_size) x 1. 

So, this logits does not match `label_ids.view(-1)` which is batch_size x 1. 

Does anyone else see this error when running the code ? 

Thanks. 




Closing issue, because I pass in the num_labels as 1 instead of 2 for the QNLI task. I was thinking that giving 1 label is enough because the 2nd label can be inferred from the 1st one.  