From 15dee6f07ca86b4545ae67fad3d418438d23d640 Mon Sep 17 00:00:00 2001 From: wxywb Date: Tue, 17 May 2022 17:36:14 +0800 Subject: [PATCH] flatten the output vector. Signed-off-by: wxywb --- clip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clip.py b/clip.py index a52aa9b..1db657c 100644 --- a/clip.py +++ b/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)