FileNotFoundError: [Errno 2] No such file or directory: 'uncased_L-12_H-768_A-12\\pytorch_model.bin'
I was just trying to get familiar with the pytorch implementation of BERT. I tried with the examles mentioned in the README file. The statement : **tokenizer = BertTokenizer.from_pretrained(BERT_PRETRAINED_PATH,do_lower_case=True)** works perfectly but when I try the same with **model = BertForMaskedLM.from_pretrained(BERT_PRETRAINED_PATH)**, it shows the error : **FileNotFoundError: [Errno 2] No such file or directory: 'uncased_L-12_H-768_A-12\\pytorch_model.bin'**   Can someone point out where I am going wrong? The pretrained bert weights are available in the same directory and the **BERT_PRETRAINED_PATH** is **Path("uncased_L-12_H-768_A-12")**
I got the same problem. Did you solve the problem?<|||||>> I got the same problem. Did you solve the problem?

Yes. Actually the project folder of this implementation does not contain the `pytorch_model.bin` file. For loading the actual pretrained model, you have to use `BertModel.from_pretrained('bert-base-uncased').` Here as the parameter, you can mention name of any one of the bert variations available. After fine-tuning, you can save the `state_dict()` of the model in the `pytorch_model.bin` file and use it later.