GPT & GPT2: binary classification fails
Using `OpenAIGPTDoubleHeadsModel` for binary classification fails.

`CrossEntropyLoss`, requires that the logits dim matches num_classes.

If `input_ids.size()` is (batch x 1 x seq_len) (only one copy of the input sequence) but mc_labels are {0, 1} (two classes), the loss fn returns a shape mismatch.  The only way it seems to work is using two copies of the input sequence, one for class 0 and a second for class 1.

I tweaked the double heads model to use `BCEWithLogitsLoss` for binary:

https://github.com/epsdg/pytorch-pretrained-BERT/blob/master/pytorch_pretrained_bert/modeling_openai.py#L955-L960

https://github.com/epsdg/pytorch-pretrained-BERT/blob/master/pytorch_pretrained_bert/modeling_gpt2.py#L943-L948

...and it works fine, but did I miss an intended use pattern?

Thanks for this fantastic port of these models - much more user-friendly than the original code.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
