Skip to content

Commit

Permalink
fix rowwise_add_grad_op
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesqiao committed Aug 18, 2017
1 parent cef27da commit 82b820e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/operators/rowwise_add_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class RowwiseAddGradOp : public framework::OperatorWithKernel {
"Input(Out@GRAD) should not be null");
auto dims0 = ctx.Input<Tensor>("X")->dims();
auto dims1 = ctx.Input<Tensor>("b")->dims();
PADDLE_ENFORCE_EQ(1, framework::product(dims1), "b dims should be 1")
PADDLE_ENFORCE_EQ(1, dims1.size(), "b dims should be 1")
ctx.Output<Tensor>(framework::GradVarName("X"))->Resize(dims0);
ctx.Output<Tensor>(framework::GradVarName("b"))->Resize(dims1);
}
Expand Down

0 comments on commit 82b820e

Please sign in to comment.