Register op version for grid_sampler, test=op_version (#29916)

* register op version for grid_sampler
revert-31562-mean
LielinJiang 4 years ago committed by GitHub
parent 5c162fe66e
commit eab0b60e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,6 +16,7 @@ limitations under the License. */
#include <memory>
#include <string>
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/framework/op_version_registry.h"
#ifdef PADDLE_WITH_CUDA
#include "paddle/fluid/platform/cudnn_helper.h"
#endif
@ -237,3 +238,11 @@ REGISTER_OP_CPU_KERNEL(
grid_sampler_grad,
ops::GridSampleGradOpKernel<paddle::platform::CPUDeviceContext, float>,
ops::GridSampleGradOpKernel<paddle::platform::CPUDeviceContext, double>);
REGISTER_OP_VERSION(grid_sampler)
.AddCheckpoint(
R"ROC(
Upgrade grid_sampler add a new attribute [mode].
)ROC",
paddle::framework::compatible::OpVersionDesc().NewAttr(
"mode", "In order to specify interpolation mode", "bilinear"));

Loading…
Cancel
Save