We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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:
No branches or pull requests
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: