From a66dfe9c64aea16c9a0e5c15f5d5ac7576fe7e04 Mon Sep 17 00:00:00 2001 From: Guanghua Yu <742925032@qq.com> Date: Mon, 6 Jul 2020 16:38:40 +0800 Subject: [PATCH] fix softnms type error (#1020) --- 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 9f288b42f..56509ab84 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