From df80b6ea8c045e8b84a3160ea89494e71e9ebce9 Mon Sep 17 00:00:00 2001 From: ktlichkid Date: Mon, 23 Apr 2018 17:04:56 +0800 Subject: [PATCH] Added InferVarType --- paddle/fluid/operators/beam_search_op.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/beam_search_op.cc b/paddle/fluid/operators/beam_search_op.cc index bee0a29e905..b0e284a2603 100644 --- a/paddle/fluid/operators/beam_search_op.cc +++ b/paddle/fluid/operators/beam_search_op.cc @@ -318,7 +318,7 @@ class BeamSearchInferShape : public framework::InferShapeBase { } } }; - +*/ class BeamSearchInferVarType : public framework::VarTypeInference { public: void operator()(const framework::OpDesc &op_desc, @@ -331,7 +331,7 @@ class BeamSearchInferVarType : public framework::VarTypeInference { } } }; -*/ + } // namespace operators } // namespace paddle /* @@ -343,7 +343,8 @@ REGISTER_OPERATOR(beam_search, paddle::operators::BeamSearchOp, */ namespace ops = paddle::operators; REGISTER_OP_WITHOUT_GRADIENT(beam_search, ops::BeamSearchOp, - ops::BeamSearchOpMaker); + ops::BeamSearchOpMaker, + ops::BeamSearchInferVarType); REGISTER_OP_CPU_KERNEL( beam_search, ops::BeamSearchOpKernel, -- GitLab