提交 ffd4e8c1 编写于 作者: S sweetsky0901

modify xx_y to xxY

上级 73a9c853
...@@ -16,9 +16,9 @@ limitations under the License. */ ...@@ -16,9 +16,9 @@ limitations under the License. */
namespace paddle { namespace paddle {
namespace operators { namespace operators {
class Detection_output_OpMaker : public framework::OpProtoAndCheckerMaker { class DetectionOutputOpMaker : public framework::OpProtoAndCheckerMaker {
public: public:
Detection_output_OpMaker(framework::OpProto* proto, DetectionOutputOpMaker(framework::OpProto* proto,
framework::OpAttrChecker* op_checker) framework::OpAttrChecker* op_checker)
: OpProtoAndCheckerMaker(proto, op_checker) { : OpProtoAndCheckerMaker(proto, op_checker) {
AddInput("Loc", AddInput("Loc",
...@@ -59,21 +59,21 @@ class Detection_output_OpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -59,21 +59,21 @@ class Detection_output_OpMaker : public framework::OpProtoAndCheckerMaker {
} }
}; };
class Detection_output_Op : public framework::OperatorWithKernel { class DetectionOutputOp : public framework::OperatorWithKernel {
public: public:
using framework::OperatorWithKernel::OperatorWithKernel; using framework::OperatorWithKernel::OperatorWithKernel;
void InferShape(framework::InferShapeContext* ctx) const override { void InferShape(framework::InferShapeContext* ctx) const override {
PADDLE_ENFORCE(ctx->HasInput("Loc"), PADDLE_ENFORCE(ctx->HasInput("Loc"),
"Input(X) of Detection_output_Op" "Input(X) of DetectionOutputOp"
"should not be null."); "should not be null.");
PADDLE_ENFORCE(ctx->HasInput("Conf"), PADDLE_ENFORCE(ctx->HasInput("Conf"),
"Input(X) of Detection_output_Op" "Input(X) of DetectionOutputOp"
"should not be null."); "should not be null.");
PADDLE_ENFORCE(ctx->HasInput("PriorBox"), PADDLE_ENFORCE(ctx->HasInput("PriorBox"),
"Input(X) of Detection_output_Op" "Input(X) of DetectionOutputOp"
"should not be null."); "should not be null.");
PADDLE_ENFORCE(ctx->HasOutput("Out"), PADDLE_ENFORCE(ctx->HasOutput("Out"),
"Output(Out) of Detection_output_Op should not be null."); "Output(Out) of DetectionOutputOp should not be null.");
std::vector<int64_t> output_shape({1, 7}); std::vector<int64_t> output_shape({1, 7});
ctx->SetOutputDim("Out", framework::make_ddim(output_shape)); ctx->SetOutputDim("Out", framework::make_ddim(output_shape));
} }
...@@ -82,8 +82,8 @@ class Detection_output_Op : public framework::OperatorWithKernel { ...@@ -82,8 +82,8 @@ class Detection_output_Op : public framework::OperatorWithKernel {
} // namespace paddle } // namespace paddle
namespace ops = paddle::operators; namespace ops = paddle::operators;
REGISTER_OP_WITHOUT_GRADIENT(detection_output, ops::Detection_output_Op, REGISTER_OP_WITHOUT_GRADIENT(detection_output, ops::DetectionOutputOp,
ops::Detection_output_OpMaker); ops::DetectionOutputOpMaker);
REGISTER_OP_CPU_KERNEL( REGISTER_OP_CPU_KERNEL(
detection_output, detection_output,
ops::Detection_output_Kernel<paddle::platform::CPUDeviceContext, float>, ops::Detection_output_Kernel<paddle::platform::CPUDeviceContext, float>,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册