SamLowe commited on
Commit
a0a646c
1 Parent(s): e16a586

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -93,7 +93,7 @@ The input to the model is called `logits`, and there is one output per label. Ea
93
  # huggingface.co/sentence-transformers/all-MiniLM-L12-v2
94
  # or from an ONNX version E.g. huggingface.co/Xenova/all-MiniLM-L12-v2
95
 
96
- print(sentences.shape) # E.g. a batch of 1 sentence
97
  > (1, 384)
98
 
99
  import onnxruntime as ort
@@ -101,7 +101,7 @@ import onnxruntime as ort
101
  sess = ort.InferenceSession("path_to_model_dot_onnx", providers=['CPUExecutionProvider'])
102
 
103
  outputs = [o.name for o in sess.get_outputs()] # list of labels, in the order of the outputs
104
- preds_onnx = sess.run(_outputs, {'logits': _label_embeddings})
105
  # preds_onnx is a list with 28 entries, one per label,
106
  # each with a numpy array of shape (1, 2) given the input was a batch of 1
107
 
 
93
  # huggingface.co/sentence-transformers/all-MiniLM-L12-v2
94
  # or from an ONNX version E.g. huggingface.co/Xenova/all-MiniLM-L12-v2
95
 
96
+ print(embeddings.shape) # E.g. a batch of 1 sentence
97
  > (1, 384)
98
 
99
  import onnxruntime as ort
 
101
  sess = ort.InferenceSession("path_to_model_dot_onnx", providers=['CPUExecutionProvider'])
102
 
103
  outputs = [o.name for o in sess.get_outputs()] # list of labels, in the order of the outputs
104
+ preds_onnx = sess.run(_outputs, {'logits': embeddings})
105
  # preds_onnx is a list with 28 entries, one per label,
106
  # each with a numpy array of shape (1, 2) given the input was a batch of 1
107