From e4bee4c42053c5a82602a1b7a94f7d024ba628f1 Mon Sep 17 00:00:00 2001 From: Alexander Pivovarov Date: Mon, 15 Mar 2021 18:35:37 -0700 Subject: [PATCH] Fix relay.testing.darknet convert_image --- python/tvm/relay/testing/darknet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/relay/testing/darknet.py b/python/tvm/relay/testing/darknet.py index c0468b7ef692..e1345043c6bb 100644 --- a/python/tvm/relay/testing/darknet.py +++ b/python/tvm/relay/testing/darknet.py @@ -31,7 +31,7 @@ def convert_image(image): """Convert the image with numpy.""" imagex = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) - imagex = np.array(image) + imagex = np.array(imagex) imagex = imagex.transpose((2, 0, 1)) imagex = np.divide(imagex, 255.0) imagex = np.flip(imagex, 0)