From ba0303ebf68593150b4c6d0b9e67ddc66d5c3107 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Mon, 6 Jul 2020 16:15:58 +0800 Subject: [PATCH] fix softnms type error (#1021) --- ppdet/modeling/ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppdet/modeling/ops.py b/ppdet/modeling/ops.py index 972fcdf16..5f6b11c44 100644 --- a/ppdet/modeling/ops.py +++ b/ppdet/modeling/ops.py @@ -610,7 +610,7 @@ class MultiClassSoftNMS(object): res.set_lod([out_offsets]) if len(pred_res) == 0: pred_res = np.array([[1]], dtype=np.float32) - res.set(np.vstack(pred_res), fluid.CPUPlace()) + res.set(np.vstack(pred_res).astype(np.float32), fluid.CPUPlace()) return res pred_result = create_tmp_var( -- GitLab