diff --git a/ppdet/modeling/ops.py b/ppdet/modeling/ops.py index 972fcdf16399422d247a056f364f8ee0a4db3904..5f6b11c4482dd1c99ab45e332a642f24c260b367 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(