modify mean pooling annotations in onnx model
Browse files
README.md
CHANGED
@@ -25238,7 +25238,7 @@ inputs = {
|
|
25238 |
# Run model
|
25239 |
outputs = session.run(None, inputs)[0]
|
25240 |
|
25241 |
-
# Apply mean pooling
|
25242 |
embeddings = mean_pooling(outputs, input_text["attention_mask"])
|
25243 |
embeddings = embeddings / np.linalg.norm(embeddings, ord=2, axis=1, keepdims=True)
|
25244 |
```
|
|
|
25238 |
# Run model
|
25239 |
outputs = session.run(None, inputs)[0]
|
25240 |
|
25241 |
+
# Apply mean pooling and normalization to the model outputs
|
25242 |
embeddings = mean_pooling(outputs, input_text["attention_mask"])
|
25243 |
embeddings = embeddings / np.linalg.norm(embeddings, ord=2, axis=1, keepdims=True)
|
25244 |
```
|