TFBertForSequenceClassification.from_pretrained ERROR
### code:
model = TFBertForSequenceClassification.from_pretrained('./bert-base-cased-tf_model.h5')

### Error message:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/DATA/disk1/wutianlong/python/miniconda3/lib/python3.6/site-packages/transformers/modeling_tf_utils.py", line 212, in from_pretrained
    **kwargs
  File "/DATA/disk1/wutianlong/python/miniconda3/lib/python3.6/site-packages/transformers/configuration_utils.py", line 154, in from_pretrained
    config = cls.from_json_file(resolved_config_file)
  File "/DATA/disk1/wutianlong/python/miniconda3/lib/python3.6/site-packages/transformers/configuration_utils.py", line 186, in from_json_file
    text = reader.read()
  File "/DATA/disk1/wutianlong/python/miniconda3/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x89 in position 0: invalid start byte

### Environment
py:3.6
tf:2.0.0

### 
I haved download "bert-base-cased-tf_model.h5" "bert-base-cased-vocab.txt" "bert-base-cased-config.json" in the same dir. when I load model "from_pretrained", I got error above. Please help me what 's wrong and how to fix it. Thanks!








Just give the path to your folder instead of the model so the loading method can also find the configuration files.

You can read more [here](https://huggingface.co/transformers/main_classes/model.html#transformers.PreTrainedModel.from_pretrained)<|||||>@thomwolf   Thank you for your help! I can load the pretrained model now. 