From 2a0357f7df7032caaf263e31c6172691d9a3cb4e Mon Sep 17 00:00:00 2001 From: Jael Gu Date: Wed, 14 Dec 2022 19:06:51 +0800 Subject: [PATCH] Fix run.py Signed-off-by: Jael Gu --- benchmark/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmark/run.py b/benchmark/run.py index b96ac1c..6857868 100644 --- a/benchmark/run.py +++ b/benchmark/run.py @@ -1,5 +1,6 @@ import os import torch +import numpy import onnxruntime import towhee @@ -48,7 +49,7 @@ query_data = query_data[:query_size] if query_size else query_data # Warm up print('Warming up...') op = ops.image_embedding.timm(model_name=model_name, device=device).get_op() -dummy_input = torch.rand((1,) + op.config['input_size']) +dummy_input = numpy.random.randn((1,) + op.config['input_size']) dim = op(dummy_input).shape[0] print(f'output dim: {dim}')