From 3a82fb4ebe0e55083696b38f7f931e35b23056f8 Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Thu, 23 Feb 2023 09:39:28 +0800 Subject: [PATCH] Fix for list inputs Signed-off-by: Jael Gu --- timm_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/timm_image.py b/timm_image.py index ab132b4..80ed6bb 100644 --- a/timm_image.py +++ b/timm_image.py @@ -125,7 +125,7 @@ class TimmImage(NNOperator): vecs = [list(x.detach().numpy()) for x in features] if isinstance(features, list) \ else list(features.detach().numpy()) else: - vecs = [x.squeeze(0).detach().numpy()] if isinstance(features, list) \ + vecs = [x.squeeze(0).detach().numpy() for x in features] if isinstance(features, list) \ else features.squeeze(0).detach().numpy() return vecs