lewtun:

from_pretrained


thanks for your reply.
I still have some question here.
should  path/to/your/bert/directory  is  path/  or  path/model.ckpt
If I use path  here, there is an error:
OSError: Error no file named ['pytorch_model.bin', 'tf_model.h5'] found in directory bert_model/ or from_pt set to False
If I use path/model.ckpt ,there is another error:
**OSError: Unable to load weights from h5 file. If you tried to load a TF 2.0 model from a PyTorch checkpoint, please set from_pt=True. 
It seem like the code can’t recognize my ckpt file.
code is like this:
config = BertConfig.from_json_file('./bert_model/bert_config.json')
model = TFBertModel.from_pretrained('bert_model/bert_model.ckpt', config=config)