From 844d8e0c2cf33dd05ce7e9a3bfa77a9a7eeb4f3d Mon Sep 17 00:00:00 2001 From: wangguanzhong Date: Thu, 31 Dec 2020 11:13:03 +0800 Subject: [PATCH] add REGISTER_OP_VERSION for generate_proposals, roi_align, roi_pool test=op_version (#30034) --- paddle/fluid/operators/detection/generate_proposals_op.cc | 7 +++++++ paddle/fluid/operators/roi_align_op.cc | 7 +++++++ paddle/fluid/operators/roi_pool_op.cc | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/paddle/fluid/operators/detection/generate_proposals_op.cc b/paddle/fluid/operators/detection/generate_proposals_op.cc index 2bf5e6c5e0..805ab8aad0 100644 --- a/paddle/fluid/operators/detection/generate_proposals_op.cc +++ b/paddle/fluid/operators/detection/generate_proposals_op.cc @@ -303,6 +303,13 @@ REGISTER_OPERATOR( REGISTER_OP_CPU_KERNEL(generate_proposals, ops::GenerateProposalsKernel, ops::GenerateProposalsKernel); REGISTER_OP_VERSION(generate_proposals) + .AddCheckpoint( + R"ROC( + Incompatible upgrade of output [RpnRoisLod])ROC", + paddle::framework::compatible::OpVersionDesc().DeleteOutput( + "RpnRoisLod", + "Delete RpnRoisLod due to incorrect output name and " + "it is not used in object detection models yet.")) .AddCheckpoint( R"ROC( Upgrade generate_proposals add a new output [RpnRoisNum])ROC", diff --git a/paddle/fluid/operators/roi_align_op.cc b/paddle/fluid/operators/roi_align_op.cc index 0eeb7e0bb2..6a4a88a004 100644 --- a/paddle/fluid/operators/roi_align_op.cc +++ b/paddle/fluid/operators/roi_align_op.cc @@ -233,6 +233,13 @@ REGISTER_OP_CPU_KERNEL( ops::CPUROIAlignGradOpKernel, ops::CPUROIAlignGradOpKernel); REGISTER_OP_VERSION(roi_align) + .AddCheckpoint( + R"ROC( + Incompatible upgrade of input [RpnRoisLod])ROC", + paddle::framework::compatible::OpVersionDesc().DeleteInput( + "RpnRoisLod", + "Delete RpnRoisLod due to incorrect input name and " + "it is not used in object detection models yet.")) .AddCheckpoint( R"ROC( Upgrade roi_align add a new input [RoisNum])ROC", diff --git a/paddle/fluid/operators/roi_pool_op.cc b/paddle/fluid/operators/roi_pool_op.cc index be3187b751..a512e7dcd6 100644 --- a/paddle/fluid/operators/roi_pool_op.cc +++ b/paddle/fluid/operators/roi_pool_op.cc @@ -227,6 +227,13 @@ REGISTER_OP_CPU_KERNEL( ops::CPUROIPoolGradOpKernel, ops::CPUROIPoolGradOpKernel); REGISTER_OP_VERSION(roi_pool) + .AddCheckpoint( + R"ROC( + Incompatible upgrade of input [RpnRoisLod])ROC", + paddle::framework::compatible::OpVersionDesc().DeleteInput( + "RpnRoisLod", + "Delete RpnRoisLod due to incorrect input name and " + "it is not used in object detection models yet.")) .AddCheckpoint( R"ROC( Upgrade roi_pool add a new input [RoisNum])ROC",