I have some problems with the "bert-large-uncased" model
Author: superwars
Pull request: no

This is the wrong code segment：

from transformers import BertTokenizer, BertModel, BertConfig
config = BertConfig.from_pretrained(args.bert_model, output_hidden_states = True, output_attentions = True)
tokenizer = BertTokenizer.from_pretrained(args.bert_model, do_lower_case=True, output_hidden_states=True)
bert = BertModel.from_pretrained(args.bert_model, config = config) # args.bert_model is 'bert-large-uncased'

And below is the bug report:

Traceback (most recent call last):
  File "main.py", line 119, in <module>
    main(args)
  File "main.py", line 64, in main
    net = BertProber(rel_vec_representation, args)
  File "/home/jzhao/program/interpret_bert/re/model.py", line 62, in __init__
    self.bert = BertModel.from_pretrained(args.bert_model, config = config)
  File "/home/jzhao/anaconda3/envs/python36/lib/python3.6/site-packages/transformers/modeling_utils.py", line 466, in from_pretrained
    model = cls(config, *model_args, **model_kwargs)
  File "/home/jzhao/anaconda3/envs/python36/lib/python3.6/site-packages/transformers/modeling_bert.py", line 615, in __init__
    self.embeddings = BertEmbeddings(config)
  File "/home/jzhao/anaconda3/envs/python36/lib/python3.6/site-packages/transformers/modeling_bert.py", line 149, in __init__
    self.word_embeddings = nn.Embedding(config.vocab_size, config.hidden_size, padding_idx=0)
  File "/home/jzhao/anaconda3/envs/python36/lib/python3.6/site-packages/torch/nn/modules/sparse.py", line 97, in __init__
    self.weight = Parameter(torch.Tensor(num_embeddings, embedding_dim))
TypeError: new() received an invalid combination of arguments - got (str, int), but expected one of:
 * (torch.device device)
 * (torch.Storage storage)
 * (Tensor other)
 * (tuple of ints size, torch.device device)
      didn't match because some of the arguments have invalid types: (str, int)
 * (object data, torch.device device)
      didn't match because some of the arguments have invalid types: (str, int)




Comments:
Hi, I tried reproducing with the following code, but couldn't get it to crash:

```py
from transformers import BertTokenizer, BertModel, BertConfig

class Args:
    bert_model = "bert-large-uncased"

args = Args()

config = BertConfig.from_pretrained(args.bert_model, output_hidden_states = True, output_attentions = True)
tokenizer = BertTokenizer.from_pretrained(args.bert_model, do_lower_case=True, output_hidden_states=True)
bert = BertModel.from_pretrained(args.bert_model, config = config) # args.bert_model is 'bert-large-uncased'
```

Can you specify your environment? Are you sure your `args.bert_model` is `bert-large-uncased`?

I made a stupid mistake. The bert model is used in two places in my code, and the second place is
`
        config = BertConfig(args.bert_model, output_hidden_states = True, output_attentions = True)
        bert = BertModel.from_pretrained(args.bert_model, config = config)
`
where I forgot to use the from_pretrained function for config, the right code should be
`
        config = BertConfig.from_pretrained(args.bert_model, output_hidden_states = True, output_attentions = True)
        bert = BertModel.from_pretrained(args.bert_model, config = config)
`