From 4ab36a71c4cdc2319d0566ddef355ad11dcddd7b Mon Sep 17 00:00:00 2001 From: dongzhihong Date: Tue, 15 Aug 2017 13:42:19 +0800 Subject: [PATCH] "fix error" --- paddle/operators/mul_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/operators/mul_op.cc b/paddle/operators/mul_op.cc index 903ca7b1847..9a57e6b68f5 100644 --- a/paddle/operators/mul_op.cc +++ b/paddle/operators/mul_op.cc @@ -68,8 +68,8 @@ class MulOpGrad : public framework::OperatorWithKernel { "Input(Out@GRAD) should not be null"); auto *x_grad = ctx.Output(framework::GradVarName("X")); auto *y_grad = ctx.Output(framework::GradVarName("Y")); - auto dim0 = ctx.Input(framework::GradVarName("X"))->dims(); - auto dim1 = ctx.Input(framework::GradVarName("Y"))->dims(); + auto dim0 = ctx.Output(framework::GradVarName("X"))->dims(); + auto dim1 = ctx.Output(framework::GradVarName("Y"))->dims(); auto out_dims = ctx.Input(framework::GradVarName("Out"))->dims(); PADDLE_ENFORCE(dim0[0] * dim1[0] == out_dims[0], "Out@GRAD[0] must equal to X[0] * Y[0]"); -- GitLab