未验证 提交 eab0b60e 编写于 作者: L LielinJiang 提交者: GitHub

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

* register op version for grid_sampler
上级 5c162fe6
......@@ -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"));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册