-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bert loading #1391
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
why is it cant work
import tensorflow as tf
from transformers import BertTokenizer, TFBertForSequenceClassification
bert_base_dir = "/path/to/bert/uncased_L-12_H-768_A-12"
model_path = bert_base_dir + "/bert_model.ckpt"
config_path = bert_base_dir + "/bert_config.json"
vocab_path = bert_base_dir + "/vocab.txt"
tokenizer = BertTokenizer.from_pretrained(vocab_path)
model = TFBertForSequenceClassification.from_pretrained(
config_path,
num_labels=2,
from_pt=True
)
The text was updated successfully, but these errors were encountered: