-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Move yolo box to phi #40112
Move yolo box to phi #40112
Conversation
Thanks for your contribution! |
… move_yolo_box_to_phi
… move_yolo_box_to_phi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
DenseTensor anchors_; | ||
auto anchors_data = | ||
anchors_.mutable_data<int>({an_num * 2}, dev_ctx.GetPlace()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutable_data改为Alloc
|
||
const T* input_data = input->data<T>(); | ||
const int* imgsize_data = imgsize->data<int>(); | ||
T* boxes_data = boxes->mutable_data<T>({n, box_num, 4}, dev_ctx.GetPlace()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
T* boxes_data = boxes->mutable_data<T>({n, box_num, 4}, dev_ctx.GetPlace()); | ||
memset(boxes_data, 0, boxes->numel() * sizeof(T)); | ||
T* scores_data = | ||
scores->mutable_data<T>({n, box_num, class_num}, dev_ctx.GetPlace()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
PR types
Breaking changes
PR changes
OPs
Describe
move yolo box to phi