Commit
•
2ce3cc6
1
Parent(s):
96b4361
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(
|