when I overwrite a model,I meet some bugs like this
ok,when I firstly overwrite a bert-bigru-crf model,i meet som bugs.
this is the model
``` python3
from torchcrf import CRF
from torch import nn
from transformers import BertModel, PreTrainedModel

class Bert_BiGru_Crf(PreTrainedModel):
      ''' I want define a  bert-bigru-crf model end-to-end,and i know how to define this model by torch.nn.Module
      '''
    def __init__(self, config):
        super().__init__(config)
        self.bert = BertModel(config)
        self.gru = nn.GRU(768,
                          768,
                          num_layers=2,
                          bidirectional=True)
        self.fc = nn.Linear(768 * 2, 15)  # BOS EOS
        self.crf = CRF(13, batch_first=True)

    def froward(self, text, label):
        out = self.bert(**text) # this text is above input_ids and attention mask
        output, _ = self.gru(out.last_hidden_state)
        output = self.fc(output)
        loss = self.crf(output, label)
        pred = self.crf .decode(output, text['attention_mask']) # decoder need mask
        return output, pred, loss
```
and i use `Bert_BiGru_Crf.from_pretrained(model_path)`，`model_path is a bert model path`
i got some bugs like those:
```
Traceback (most recent call last):
  File "C:/Users/wie/Documents/项目/ner/bert-crf/train.py", line 103, in <module>
    train()
  File "C:/Users/wie/Documents/项目/ner/bert-crf/train.py", line 42, in train
    embed_model = model.Bert_BiGru_Crf.from_pretrained(model_path)
  File "C:\Users\wie\Miniconda3\lib\site-packages\transformers\modeling_utils.py", line 1067, in from_pretrained
    config, model_kwargs = cls.config_class.from_pretrained(
AttributeError: 'NoneType' object has no attribute 'from_pretrained'
```
``` python3
# Name                    Version                   Build  Channel
pytorch-transformers      1.2.0                    pypi_0    pypi 
transformers              4.6.1                    pypi_0    pypi
pytorch-crf               0.7.2                    pypi_0    pypi
pytorch-lightning         1.4.4                    pypi_0    pypi
torch                     1.8.1+cpu                pypi_0    pypi
torchaudio                0.8.1                    pypi_0    pypi
torchmetrics              0.5.0                    pypi_0    pypi
torchtext                 0.9.1                    pypi_0    pypi
torchvision               0.9.1+cpu                pypi_0    pypi
```
my python vesion is 3.7.9
would you mind to help me slove this problem?