From 8ecf9aa723b88f132f90c01461c2dd0dfda0b603 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 2 Nov 2022 08:54:04 +0000 Subject: [PATCH] update ACL_TensorFlow/built-in/cv/MobileNetv1_for_ACL/scripts/mobilenetv1_preprocessing.py. Signed-off-by: alex --- .../MobileNetv1_for_ACL/scripts/mobilenetv1_preprocessing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ACL_TensorFlow/built-in/cv/MobileNetv1_for_ACL/scripts/mobilenetv1_preprocessing.py b/ACL_TensorFlow/built-in/cv/MobileNetv1_for_ACL/scripts/mobilenetv1_preprocessing.py index 1399b4dd8..0a2b3d578 100644 --- a/ACL_TensorFlow/built-in/cv/MobileNetv1_for_ACL/scripts/mobilenetv1_preprocessing.py +++ b/ACL_TensorFlow/built-in/cv/MobileNetv1_for_ACL/scripts/mobilenetv1_preprocessing.py @@ -382,7 +382,8 @@ def preprocess(src_path, save_path): if not os.path.isdir(file): print(file) img = convert_RGB(os.path.join(src_path, file)) - print(type(img)) + img = np.array(img) + img = tf.convert_to_tensor(img) img = preprocess_image(img, 224, 224, -- Gitee