Skip to content

Commit 87e801f

Browse files
committed
add mean pool note
1 parent 8a52b96 commit 87e801f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/transforms/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ end
8080

8181
### Sentence Embedding
8282

83+
84+
!!! note "Mean Pooling"
85+
To mean-pool embeddings, you can use the `Tensor:mean_pool` function like this: `tensor:mean_pool(mask)`.
86+
8387
```lua
8488
--- input: 3d tensor of shape [batch_size, seq_len, hidden]
8589
---@param arr Tensor

0 commit comments

Comments
 (0)