Browse Source
flatten the output vector.
Signed-off-by: wxywb <xy.wang@zilliz.com>
main
wxywb
3 years ago
1 changed files with
1 additions and
1 deletions
-
clip.py
|
|
@ -49,7 +49,7 @@ class Clip(NNOperator): |
|
|
|
vec = self._inference_from_text(data) |
|
|
|
else: |
|
|
|
raise ValueError("modality[{}] not implemented.".format(self._modality)) |
|
|
|
return vec.detach().cpu().numpy() |
|
|
|
return vec.detach().cpu().numpy().flatten() |
|
|
|
|
|
|
|
def _inference_from_text(self, text): |
|
|
|
text = self.tokenize(text).to(self.device) |
|
|
|