From cfd7721b51c2009bfbc9049d25da5eab6aa29745 Mon Sep 17 00:00:00 2001 From: sweetsky0901 Date: Mon, 27 Nov 2017 11:13:07 +0800 Subject: [PATCH] add unpool_op.h modify --- paddle/operators/unpool_op.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/operators/unpool_op.h b/paddle/operators/unpool_op.h index e22171649..ae11a9f4f 100644 --- a/paddle/operators/unpool_op.h +++ b/paddle/operators/unpool_op.h @@ -28,7 +28,7 @@ class UnpoolKernel : public framework::OpKernel { const framework::Tensor* in_x = context.Input("X"); const framework::Tensor* in_y = context.Input("Y"); auto * out = context.Output("Out"); - std::string unpoolingtype = context.Attr("unpoolingtype"); + std::string unpooling_type = context.Attr("unpoolingtype"); std::vector ksize = context.Attr>("ksize"); std::vector strides = context.Attr>("strides"); std::vector paddings = context.Attr>("paddings"); @@ -53,7 +53,7 @@ class UnpoolGradKernel : public framework::OpKernel { context.Input(framework::GradVarName("Out")); framework::Tensor* in_x_grad = context.Output(framework::GradVarName("X")); - std::string unpoolingtype = context.Attr("unpoolingtype"); + std::string unpooling_type = context.Attr("unpoolingtype"); std::vector ksize = context.Attr>("ksize"); std::vector strides = context.Attr>("strides"); std::vector paddings = context.Attr>("paddings"); @@ -65,8 +65,8 @@ class UnpoolGradKernel : public framework::OpKernel { zero(device_ctx, in_x_grad, static_cast(0)); } math::Unpool2dMaxGradFunctor unpool2d_max_backward; - unpool2d_max_backward(context.device_context(), *in_x, *in_y, in_x_grad, - *out, *out_grad); + unpool2d_max_backward(context.device_context(), *in_x, *in_y, + *out, *out_grad, in_x_grad); } }; -- GitLab