|
|
|
@ -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"));
|
|
|
|
|