joshnguyen
commited on
Commit
•
45a37da
1
Parent(s):
d41ff0e
Update README.md
Browse files
README.md
CHANGED
@@ -85,5 +85,5 @@ inputs.to(model.device)
|
|
85 |
outputs = model(**inputs, output_hidden_states=True)
|
86 |
|
87 |
# Last layer of the hidden states. Get average embedding of all tokens
|
88 |
-
embeddings = outputs["hidden_states"][-1][:, :, ...].mean().detach().cpu().numpy()
|
89 |
```
|
|
|
85 |
outputs = model(**inputs, output_hidden_states=True)
|
86 |
|
87 |
# Last layer of the hidden states. Get average embedding of all tokens
|
88 |
+
embeddings = outputs["hidden_states"][-1][:, 1:, ...].mean(1).detach().cpu().numpy()
|
89 |
```
|