提交 ea95f9c3 编写于 作者: F frankwhzhang

fix style bug, test=develop

上级 68c20258
...@@ -28,12 +28,12 @@ class BprLossOp : public framework::OperatorWithKernel { ...@@ -28,12 +28,12 @@ class BprLossOp : public framework::OperatorWithKernel {
PADDLE_ENFORCE(ctx->HasOutput("Y"), "Output(Y) should be not null."); PADDLE_ENFORCE(ctx->HasOutput("Y"), "Output(Y) should be not null.");
auto x_dims = ctx->GetInputDim("X"); auto x_dims = ctx->GetInputDim("X");
auto label_Pos_dims = ctx->GetInputDim("LabelPos"); auto label_pos_dims = ctx->GetInputDim("LabelPos");
int rank = x_dims.size(); int rank = x_dims.size();
PADDLE_ENFORCE_EQ(rank, label_Pos_dims.size(), PADDLE_ENFORCE_EQ(rank, label_pos_dims.size(),
"Input(X) and Input(LabelPos) shall have the same rank."); "Input(X) and Input(LabelPos) shall have the same rank.");
PADDLE_ENFORCE_EQ(framework::slice_ddim(x_dims, 0, rank - 1), PADDLE_ENFORCE_EQ(framework::slice_ddim(x_dims, 0, rank - 1),
framework::slice_ddim(label_Pos_dims, 0, rank - 1), framework::slice_ddim(label_pos_dims, 0, rank - 1),
"Input(X) and Input(LabelPos) shall have the same shape " "Input(X) and Input(LabelPos) shall have the same shape "
"except the last dimension."); "except the last dimension.");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册