From 9a53f243219e318390755fe90f44601be447ed71 Mon Sep 17 00:00:00 2001 From: deepr <hexiangdong2020@outlook.com> Date: Thu, 12 Aug 2021 21:43:37 +0800 Subject: [PATCH] Fix Bug: UnboundLocalError: local variable 'img_' referenced before assignment --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index f7accf3..57ad95d 100644 --- a/main.py +++ b/main.py @@ -94,7 +94,7 @@ def eval_batch(eval_net, img_lst, crop_size=513, flip=True): batch_img = np.zeros((4, 3, crop_size, crop_size), dtype=np.float32) resize_hw = [] for l in range(batch_size): - # img_ = img_lst[l] + img_ = img_lst[l] # resize_h, resize_w, _ = img_.shape # hwc to chw # img_ = img_.transpose((2, 0, 1)) -- GitLab