RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
I am using part of your evaluation code, with slight modifications:

https://github.com/danyaljj/pytorch-pretrained-BERT/blob/92e22d710287db1b4aa4fda951714887878fa728/examples/daniel_run.py#L582-L616

Wondering if you have encountered the following error: 

```
(env3.6) khashab2@gissing:/shared/shelley/khashab2/pytorch-pretrained-BERT$ python3.6   examples/daniel_run.py
Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex.
loaded the model to base . . .
loading the bert  . . .
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1248501532/1248501532 [00:26<00:00, 46643749.96B/s]

Evaluating:   0%|                                                                                                                                                         | 0/1355 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "examples/daniel_run.py", line 817, in <module>
    evaluate_model()
  File "examples/daniel_run.py", line 606, in evaluate_model
    batch_start_logits, batch_end_logits = model(input_ids, segment_ids, input_mask)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/env3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/pytorch_pretrained_bert/modeling.py", line 1096, in forward
    sequence_output, _ = self.bert(input_ids, token_type_ids, attention_mask, output_all_encoded_layers=False)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/env3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/pytorch_pretrained_bert/modeling.py", line 626, in forward
    embedding_output = self.embeddings(input_ids, token_type_ids)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/env3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/pytorch_pretrained_bert/modeling.py", line 193, in forward
    words_embeddings = self.word_embeddings(input_ids)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/env3.6/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/env3.6/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 110, in forward
    self.norm_type, self.scale_grad_by_freq, self.sparse)
  File "/shared/shelley/khashab2/pytorch-pretrained-BERT/env3.6/lib/python3.6/site-packages/torch/nn/functional.py", line 1110, in embedding
    return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of type torch.LongTensor but found type torch.cuda.LongTensor for argument #3 'index'
```
The issue was, not properly loading the model file and moving it to GPU. 