From 5c87a7afce53dc5c089b9c96bc1f65173123d420 Mon Sep 17 00:00:00 2001 From: xiegegege <46314656+xiegegege@users.noreply.github.com> Date: Fri, 30 Dec 2022 17:11:21 +0800 Subject: [PATCH] update np.bool for numpy 1.24 (#7574) --- ppdet/data/transform/batch_operators.py | 2 +- ppdet/modeling/assigners/simota_assigner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ppdet/data/transform/batch_operators.py b/ppdet/data/transform/batch_operators.py index f111adda4..aaf4d18e2 100644 --- a/ppdet/data/transform/batch_operators.py +++ b/ppdet/data/transform/batch_operators.py @@ -785,7 +785,7 @@ class Gt2Solov2Target(BaseOperator): ins_label = [] grid_order = [] cate_label = np.zeros([num_grid, num_grid], dtype=np.int64) - ins_ind_label = np.zeros([num_grid**2], dtype=np.bool) + ins_ind_label = np.zeros([num_grid**2], dtype=np.bool_) if num_ins == 0: ins_label = np.zeros( diff --git a/ppdet/modeling/assigners/simota_assigner.py b/ppdet/modeling/assigners/simota_assigner.py index 92fe84d7f..abc055d29 100644 --- a/ppdet/modeling/assigners/simota_assigner.py +++ b/ppdet/modeling/assigners/simota_assigner.py @@ -236,7 +236,7 @@ class SimOTAAssigner(object): )] = match_fg_mask_inmatrix assigned_gt_inds[match_fg_mask_inall.astype( - np.bool)] = match_gt_inds_to_fg + 1 + np.bool_)] = match_gt_inds_to_fg + 1 pos_inds, neg_inds, pos_gt_bboxes, pos_assigned_gt_inds \ = self.get_sample(assigned_gt_inds, gt_bboxes.numpy()) -- GitLab