Update handler.py
Browse files- handler.py +1 -2
handler.py
CHANGED
@@ -66,11 +66,10 @@ class EndpointHandler():
|
|
66 |
model_output = self.onnx_extractor(sentence)
|
67 |
print("E")
|
68 |
|
69 |
-
max_pooled_output, _ = torch.max(model_output, dim=1)
|
70 |
# Perform pooling. In this case, max pooling.
|
71 |
# embedding = mean_pooling(model_output, encoded_input['attention_mask'])
|
72 |
print("F")
|
73 |
|
74 |
-
sentence_embeddings.append(
|
75 |
print("G")
|
76 |
return sentence_embeddings
|
|
|
66 |
model_output = self.onnx_extractor(sentence)
|
67 |
print("E")
|
68 |
|
|
|
69 |
# Perform pooling. In this case, max pooling.
|
70 |
# embedding = mean_pooling(model_output, encoded_input['attention_mask'])
|
71 |
print("F")
|
72 |
|
73 |
+
sentence_embeddings.append(max_pooling(model_output))
|
74 |
print("G")
|
75 |
return sentence_embeddings
|