Skip to content

Commit 35756ea

Browse files
committed
docs: update test config
1 parent 2dc0b4f commit 35756ea

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

test_config.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@ encoderfile:
22
name: my-model-2
33
path: models/token_classification
44
model_type: token_classification
5-
output_dir: ./my-model-2.encoderfile
6-
transform:
7-
path: transforms/token_classification/softmax_logits.lua
5+
output_path: ./my-model-2.encoderfile
6+
transform: |
7+
--- Applies a softmax across token classification logits.
8+
--- Each token classification is normalized independently.
9+
---
10+
--- Args:
11+
--- arr (Tensor): A tensor of shape [batch_size, n_tokens, n_labels].
12+
--- The softmax is applied along the third axis (n_labels).
13+
---
14+
--- Returns:
15+
--- Tensor: The input tensor with softmax-normalized embeddings.
16+
---@param arr Tensor
17+
---@return Tensor
18+
function Postprocess(arr)
19+
return arr:softmax(3)
20+
end

0 commit comments

Comments
 (0)