diff --git a/paddle/fluid/operators/pixel_shuffle_op.cc b/paddle/fluid/operators/pixel_shuffle_op.cc index 111a82c6cce78b0b6fa462c332d9bd3dd6ce6e43..cb9bbe727de5c014ebfe9ea93f6fe279a897569b 100644 --- a/paddle/fluid/operators/pixel_shuffle_op.cc +++ b/paddle/fluid/operators/pixel_shuffle_op.cc @@ -11,6 +11,7 @@ limitations under the License. */ #include "paddle/fluid/operators/pixel_shuffle_op.h" #include +#include "paddle/fluid/framework/op_version_registry.h" namespace paddle { namespace operators { @@ -185,3 +186,10 @@ REGISTER_OP_CPU_KERNEL( pixel_shuffle_grad, ops::PixelShuffleGradOpKernel, ops::PixelShuffleGradOpKernel); + +REGISTER_OP_VERSION(pixel_shuffle) + .AddCheckpoint( + R"ROC( + Compatible upgrade of pixel_shuffle, add a new attribute [data_format])ROC", + paddle::framework::compatible::OpVersionDesc().NewAttr( + "data_format", "Specify the data format of the input data", true));