Skip to content

【Infer Symbolic Shape No.11】【BUAA】 Add box_coder op #67864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Sep 4, 2024

Conversation

MufanColin
Copy link
Contributor

PR Category

CINN

PR Types

Improvements

Description

添加 box_coder 算子符号推导接口。

Copy link

paddle-bot bot commented Aug 30, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@MufanColin MufanColin changed the title 【Infer Symbolic Shape No.11】[BUAA] Add box_coder op 【Infer Symbolic Shape No.11】【BUAA】 Add box_coder op Aug 30, 2024
@luotao1 luotao1 added contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 labels Aug 30, 2024
phi::errors::InvalidArgument(
"The dimension of Input(PriorBoxVar) should be equal to "
"the dimension of Input(PriorBox) in BoxCoder operator "
"when the rank is 2."));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里需要写个循环,逐元素添加equalcstr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改。

infer_context->SetShapeOrDataForValue(
op->result(0),
symbol::ShapeOrDataDimExprs{symbol::TensorShapeOrDataDimExprs(
{target_box_shape[0], prior_box_shape[0], 4})});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

顺便改成symbol::DimExpr(4)吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改。

Copy link
Contributor

@gongshaotian gongshaotian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luotao1 luotao1 merged commit 8a101d2 into PaddlePaddle:develop Sep 4, 2024
29 checks passed
const std::string &code_type =
op->attribute<pir::StrAttribute>("code_type").AsString();
int axis = op->attribute<pir::Int32Attribute>("axis").data();
const std::vector<float> &variance =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variance 定义了但没有用到,在clang会报错,不需要可以删除
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants