diff --git a/ppdet/modeling/ops.py b/ppdet/modeling/ops.py index 9f288b42f255eae9c0aca9a438da8793e85efafa..56509ab84e3aff91da0ee6f5bf9e00850b8cb213 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(