fix loading from tf/pt
This commit is contained in:
1 parent
a049c8043b
commit
3b7fb48c3b
3 files changed
+5
-4
No files matched your search
@@ -27,7 +27,8 @@ tf_model.save_pretrained('./runs/')
|
||||
pt_model = BertForSequenceClassification.from_pretrained('./runs/')
|
||||
|
||||
# Quickly inspect a few predictions
|
||||
|
||||
inputs = tokenizer.encode_plus("I said the company is doing great", "The company has good results", add_special_tokens=True)
|
||||
pred = pt_model(torch.tensor([tokens]))
|
||||
|
||||
# Divers
|
||||
import torch
|
||||
|
||||
Reference in new issue
Block a user