From 5e820818e9c161fdf0bb89913d96aa628c93dbcc Mon Sep 17 00:00:00 2001 From: Jacky Lee <39754370+jla524@users.noreply.github.com> Date: Tue, 14 Mar 2023 08:13:19 -0700 Subject: [PATCH] Cast image to float32 (#702) --- examples/efficientnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/efficientnet.py b/examples/efficientnet.py index af6bf8acdc..41e871be70 100644 --- a/examples/efficientnet.py +++ b/examples/efficientnet.py @@ -45,7 +45,7 @@ def infer(model, img): """ # run the net - out = _infer(model, Tensor(img)).numpy() + out = _infer(model, Tensor(img.astype("float32"))).numpy() # if you want to look at the outputs """