From 956ff118c791960a95c2942e1c2d1777160b2c0e Mon Sep 17 00:00:00 2001 From: yiicy Date: Thu, 20 Feb 2020 11:48:53 +0800 Subject: [PATCH] [cherry-pick] add multiclass_nms2 kernel, test=develop (#2917) (#2944) add multiclass_nms2 kernel, test=develop --- lite/kernels/host/multiclass_nms_compute.cc | 11 +++++++++++ lite/operators/multiclass_nms_op.cc | 1 + 2 files changed, 12 insertions(+) diff --git a/lite/kernels/host/multiclass_nms_compute.cc b/lite/kernels/host/multiclass_nms_compute.cc index 9cbc798d46..9f4c2fb6f5 100644 --- a/lite/kernels/host/multiclass_nms_compute.cc +++ b/lite/kernels/host/multiclass_nms_compute.cc @@ -429,6 +429,17 @@ REGISTER_LITE_KERNEL(multiclass_nms, .BindInput("BBoxes", {LiteType::GetTensorTy(TARGET(kHost))}) .BindInput("Scores", {LiteType::GetTensorTy(TARGET(kHost))}) .BindOutput("Out", {LiteType::GetTensorTy(TARGET(kHost))}) + .Finalize(); + +REGISTER_LITE_KERNEL(multiclass_nms2, + kHost, + kFloat, + kNCHW, + paddle::lite::kernels::host::MulticlassNmsCompute, + def) + .BindInput("BBoxes", {LiteType::GetTensorTy(TARGET(kHost))}) + .BindInput("Scores", {LiteType::GetTensorTy(TARGET(kHost))}) + .BindOutput("Out", {LiteType::GetTensorTy(TARGET(kHost))}) .BindOutput("Index", {LiteType::GetTensorTy(TARGET(kHost), PRECISION(kInt32))}) .Finalize(); diff --git a/lite/operators/multiclass_nms_op.cc b/lite/operators/multiclass_nms_op.cc index 9dba5de4f8..9ec79f8b57 100644 --- a/lite/operators/multiclass_nms_op.cc +++ b/lite/operators/multiclass_nms_op.cc @@ -84,3 +84,4 @@ bool MulticlassNmsOpLite::AttachImpl(const cpp::OpDesc& opdesc, } // namespace paddle REGISTER_LITE_OP(multiclass_nms, paddle::lite::operators::MulticlassNmsOpLite); +REGISTER_LITE_OP(multiclass_nms2, paddle::lite::operators::MulticlassNmsOpLite); -- GitLab