help...
## ❓ Questions & Help

<!-- A clear and concise description of the question. -->
---------------------------------------------------------------------------

i saw great example in (https://huggingface.co/transformers/main_classes/model.html?highlight=from_pretrained#pretrainedmodel) but i got an error please help 


![image](https://user-images.githubusercontent.com/48268050/72089118-d0193500-334e-11ea-9b23-a63bcfe67e44.png)


config = BertConfig.from_json_file('./tf_model/my_tf_model_config.json')
model = BertModel.from_pretrained('./tf_model/my_tf_checkpoint.ckpt.index', from_tf=True, config=config)

i followed this 2 lines code but get error please help...

![image](https://user-images.githubusercontent.com/48268050/72089259-0a82d200-334f-11ea-9489-f97be66bd67d.png)

here is my code

![image](https://user-images.githubusercontent.com/48268050/72089322-2a19fa80-334f-11ea-91ae-297c0b20b852.png)

I haven't worked on TF code like this personally, but by looking [https://github.com/huggingface/transformers/blob/master/README.md#quick-tour-tf-20-training-and-pytorch-interoperability](url) It shows that they don't override the config like you have done.

Now if that doesn't work - which I don't think it will work to be fair - my guess is that the model file your attempting to load is of type `BertModel` when it should be ` TFBertForSequenceClassification`

Have a look at the link and let us know how you get on.<|||||>Please also change the title of this issue to something meaningful.<|||||>First of all: please change your title and please post code snippets in tags and not images. They load slow, are hard to read, and impossible to copy-paste - just plain annoying. :-)

Second, it seems that your checkpoint contains additional layers, particularly a classifier layer. So you probably want to load the weights into another model architecture. Probably one of these (instead of just `BertModel`):

- BertForSequenceClassification
- BertForTokenClassification
- BertForMultipleChoice<|||||>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.
