提交 66bb5dd7 编写于 作者: J jerrywgz

refine infer shape, test=develop

上级 0d915078
......@@ -43,7 +43,7 @@ class BoxCoderOp : public framework::OperatorWithKernel {
if (prior_box_var_dims.size() == 1) {
PADDLE_ENFORCE_EQ(
prior_box_var_dims[0], 4,
"The 1st dimension of Input(PriorBoxVar) should be 1"
"The 1st dimension of Input(PriorBoxVar) should be 4"
"when the rank is 1.");
} else {
PADDLE_ENFORCE_EQ(
......@@ -52,9 +52,9 @@ class BoxCoderOp : public framework::OperatorWithKernel {
"the dimension of Input(PriorBox when the rank is 2.)");
}
}
}
auto code_type =
GetBoxCodeType(ctx->Attrs().Get<std::string>("code_type"));
auto code_type = GetBoxCodeType(ctx->Attrs().Get<std::string>("code_type"));
int axis = ctx->Attrs().Get<int>("axis");
if (code_type == BoxCodeType::kEncodeCenterSize) {
PADDLE_ENFORCE_EQ(target_box_dims.size(), 2,
......@@ -84,7 +84,6 @@ class BoxCoderOp : public framework::OperatorWithKernel {
ctx->ShareLoD("TargetBox", /*->*/ "OutputBox");
}
}
}
};
class BoxCoderOpMaker : public framework::OpProtoAndCheckerMaker {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册