Commit
·
6f5f9fa
1
Parent(s):
3d0f1f6
Update call to forward pass to match latest API
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ inputs = tokenizer(text, padding=True, truncation=True, return_tensors="pt")
|
|
| 31 |
|
| 32 |
# Embed the text
|
| 33 |
with torch.no_grad():
|
| 34 |
-
sequence_output
|
| 35 |
|
| 36 |
# Mean pool the token-level embeddings to get sentence-level embeddings
|
| 37 |
embeddings = torch.sum(
|
|
|
|
| 31 |
|
| 32 |
# Embed the text
|
| 33 |
with torch.no_grad():
|
| 34 |
+
sequence_output = model(**inputs)[0]
|
| 35 |
|
| 36 |
# Mean pool the token-level embeddings to get sentence-level embeddings
|
| 37 |
embeddings = torch.sum(
|