-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
add Detection output op for SSD #6488
add Detection output op for SSD #6488
Conversation
… detection_output
… detection_output
… detection_output
… detection_output
namespace paddle { | ||
namespace operators { | ||
|
||
class Detection_output_OpMaker : public framework::OpProtoAndCheckerMaker { |
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.
Please follow the naming style.
Detection_output_OpMaker --> DetectionOutputOpMaker
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.
done
|
||
class Detection_output_OpMaker : public framework::OpProtoAndCheckerMaker { | ||
public: | ||
Detection_output_OpMaker(framework::OpProto* proto, |
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.
Same too.
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.
done
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.
done
thanks
namespace paddle { | ||
namespace operators { | ||
|
||
class Detection_output_OpMaker : public framework::OpProtoAndCheckerMaker { |
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.
done
|
||
class Detection_output_OpMaker : public framework::OpProtoAndCheckerMaker { | ||
public: | ||
Detection_output_OpMaker(framework::OpProto* proto, |
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.
done
} | ||
} | ||
template <typename DeviceContext, typename T> | ||
class Detection_output_Kernel : public framework::OpKernel<T> { |
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.
class name use camel-case naming.
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.
done
// KNCHW ==> NHWC | ||
// template <typename T> | ||
template <typename T> | ||
void getBBoxFromPriorData(const T* prior_data, const size_t num_bboxes, |
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.
use lowercase naming.
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.
done
void getBBoxVarFromPriorData(const T* prior_data, const size_t num, | ||
std::vector<std::vector<T>>& var_vec); | ||
template <typename T> | ||
BBox<T> decodeBBoxWithVar(BBox<T>& prior_bbox, |
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.
use lowercase naming.
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.
done
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.
done
// KNCHW ==> NHWC | ||
// template <typename T> | ||
template <typename T> | ||
void getBBoxFromPriorData(const T* prior_data, const size_t num_bboxes, |
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.
done
void getBBoxVarFromPriorData(const T* prior_data, const size_t num, | ||
std::vector<std::vector<T>>& var_vec); | ||
template <typename T> | ||
BBox<T> decodeBBoxWithVar(BBox<T>& prior_bbox, |
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.
done
} | ||
} | ||
template <typename DeviceContext, typename T> | ||
class Detection_output_Kernel : public framework::OpKernel<T> { |
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.
done
… detection_output
… detection_output
… detection_output
… detection_output
@@ -187,6 +186,36 @@ endfunction() | |||
add_subdirectory(math) | |||
add_subdirectory(nccl) |
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 merge的有点早。这里cmake的冲突来自于 #7067 ,但不应该直接加189-218行。
Paddle/paddle/operators/detection_output_op.h Lines 53 to 164 in 43dab72
|
fix #6225