diff --git a/paddle/fluid/operators/array_to_lod_tensor_op.cc b/paddle/fluid/operators/array_to_lod_tensor_op.cc index ea65cf4e62c411bdb049ebdb3cec6e0ec4d29ed0..4f656ab165fea82f0545700f462470550dec1d95 100644 --- a/paddle/fluid/operators/array_to_lod_tensor_op.cc +++ b/paddle/fluid/operators/array_to_lod_tensor_op.cc @@ -189,9 +189,9 @@ class ArrayToLoDTensorInferShape : public framework::InferShapeBase { public: void operator()(framework::InferShapeContext *context) const override { PADDLE_ENFORCE(context->HasInput("X"), - "ArrayToLoDTensorOp must has input X."); + "ArrayToLoDTensorOp must have input X."); PADDLE_ENFORCE(context->HasInput("RankTable"), - "ArrayToLoDTensorOp must has input RankTable."); + "ArrayToLoDTensorOp must have input RankTable."); // For compile-time, the first dim of input X and output Out should be -1. // For runtime, the first dim of output Out should be the sum of all // elements's first dim in input X. The output's dims will be re-computed in diff --git a/paddle/fluid/operators/beam_search_decode_op.cc b/paddle/fluid/operators/beam_search_decode_op.cc index 5eec87887acdf37f32800b1c65b51c9bd5b325f0..3edaf58cd01455e17a9745d4dea3a3840514da22 100644 --- a/paddle/fluid/operators/beam_search_decode_op.cc +++ b/paddle/fluid/operators/beam_search_decode_op.cc @@ -191,13 +191,13 @@ class BeamSearchDecodeInferShape : public framework::InferShapeBase { public: void operator()(framework::InferShapeContext* context) const override { PADDLE_ENFORCE(context->HasInput("Ids"), - "BeamSearchDecodeOp must has input Ids"); + "BeamSearchDecodeOp must have input Ids"); PADDLE_ENFORCE(context->HasInput("Scores"), - "BeamSearchDecodeOp must has input Scores"); + "BeamSearchDecodeOp must have input Scores"); PADDLE_ENFORCE(context->HasOutput("SentenceIds"), - "BeamSearchDecodeOp must has output SentenceIds"); + "BeamSearchDecodeOp must have output SentenceIds"); PADDLE_ENFORCE(context->HasOutput("SentenceScores"), - "BeamSearchDecodeOp must has output SentenceScores"); + "BeamSearchDecodeOp must have output SentenceScores"); } }; diff --git a/paddle/fluid/operators/controlflow/compare_op.cc b/paddle/fluid/operators/controlflow/compare_op.cc index be71319cbbe6af7ccb4bd55cce97e359942750ec..11b24304eaee994f7db26ba3c91d0cedf47240b4 100644 --- a/paddle/fluid/operators/controlflow/compare_op.cc +++ b/paddle/fluid/operators/controlflow/compare_op.cc @@ -80,9 +80,9 @@ class CompareOp : public framework::OperatorWithKernel { protected: void InferShape(framework::InferShapeContext* context) const override { OpComment comment; - PADDLE_ENFORCE(context->HasInput("X"), "%s operator must has input X", + PADDLE_ENFORCE(context->HasInput("X"), "%s operator must have input X", comment.type); - PADDLE_ENFORCE(context->HasInput("Y"), "%s operator must has input Y", + PADDLE_ENFORCE(context->HasInput("Y"), "%s operator must have input Y", comment.type); auto dim_x = context->GetInputDim("X"); auto dim_y = context->GetInputDim("Y"); diff --git a/paddle/fluid/operators/distributed_ops/merge_ids_op.cc b/paddle/fluid/operators/distributed_ops/merge_ids_op.cc index 712ff56c8c241b4a7c7a301b037eb8635b71d0f9..324edd7e47964ad358aa607ad606a5864d99aed7 100644 --- a/paddle/fluid/operators/distributed_ops/merge_ids_op.cc +++ b/paddle/fluid/operators/distributed_ops/merge_ids_op.cc @@ -83,12 +83,12 @@ class MergeIdsOp : public framework::OperatorWithKernel { void InferShape(framework::InferShapeContext *ctx) const override { PADDLE_ENFORCE(ctx->HasInputs("Ids"), - "MergeIdsOp must has multi input Ids."); + "MergeIdsOp must have multi input Ids."); PADDLE_ENFORCE(ctx->HasInputs("Rows"), - "MergeIdsOp must has multi input Rows."); - PADDLE_ENFORCE(ctx->HasInputs("X"), "MergeIdsOp must has multi input X."); + "MergeIdsOp must have multi input Rows."); + PADDLE_ENFORCE(ctx->HasInputs("X"), "MergeIdsOp must have multi input X."); PADDLE_ENFORCE(ctx->HasOutputs("Out"), - "MergeIdsOp must has multi output Out."); + "MergeIdsOp must have multi output Out."); auto ids_var_type = ctx->GetInputsVarType("Ids").front(); auto ids_dims = ctx->GetInputsDim("Ids"); diff --git a/paddle/fluid/operators/distributed_ops/split_ids_op.cc b/paddle/fluid/operators/distributed_ops/split_ids_op.cc index 603f697592279aff21cd4a59d4556021aafcae5b..b708626760caead47804edf9abb83afe8c2efc7c 100644 --- a/paddle/fluid/operators/distributed_ops/split_ids_op.cc +++ b/paddle/fluid/operators/distributed_ops/split_ids_op.cc @@ -52,8 +52,8 @@ class SplitIdsOp : public framework::OperatorWithKernel { using framework::OperatorWithKernel::OperatorWithKernel; void InferShape(framework::InferShapeContext *ctx) const override { - PADDLE_ENFORCE(ctx->HasInputs("Ids"), "SplitIdsOp must has input Ids."); - PADDLE_ENFORCE(ctx->HasOutputs("Out"), "SplitIdsOp must has output Out."); + PADDLE_ENFORCE(ctx->HasInputs("Ids"), "SplitIdsOp must have input Ids."); + PADDLE_ENFORCE(ctx->HasOutputs("Out"), "SplitIdsOp must have output Out."); auto ids_var_type = ctx->GetInputsVarType("Ids").front(); auto ids_dims = ctx->GetInputsDim("Ids"); diff --git a/paddle/fluid/operators/get_tensor_from_selected_rows_op.cc b/paddle/fluid/operators/get_tensor_from_selected_rows_op.cc index d8470bad1188b5a69e08e4b9c74957339bb04294..8c90965678ddb166cf269096261cc4eb25136a83 100644 --- a/paddle/fluid/operators/get_tensor_from_selected_rows_op.cc +++ b/paddle/fluid/operators/get_tensor_from_selected_rows_op.cc @@ -24,9 +24,9 @@ class GetTensorFromSelectedRowsOp : public framework::OperatorWithKernel { void InferShape(framework::InferShapeContext *ctx) const override { PADDLE_ENFORCE(ctx->HasInput("X"), - "GetTensorFromSelectedRowsOp must has input X."); + "GetTensorFromSelectedRowsOp must have input X."); PADDLE_ENFORCE(ctx->HasOutput("Out"), - "GetTensorFromSelectedRowsOp must has output Out."); + "GetTensorFromSelectedRowsOp must have output Out."); PADDLE_ENFORCE( ctx->GetInputsVarType("X").front() == framework::proto::VarType::SELECTED_ROWS, diff --git a/paddle/fluid/operators/lod_rank_table_op.cc b/paddle/fluid/operators/lod_rank_table_op.cc index 8e16834e8435a30f77d5e1dd19a53b5436490d01..c73aaf75bcfbfa2bc2b0baeed53c8de1aaae095d 100644 --- a/paddle/fluid/operators/lod_rank_table_op.cc +++ b/paddle/fluid/operators/lod_rank_table_op.cc @@ -58,7 +58,7 @@ output operators. class LoDRankTableInferShape : public framework::InferShapeBase { public: void operator()(framework::InferShapeContext *context) const override { - PADDLE_ENFORCE(context->HasInput("X"), "LoDRankTable must has input X"); + PADDLE_ENFORCE(context->HasInput("X"), "LoDRankTable must have input X"); } }; diff --git a/paddle/fluid/operators/merge_lod_tensor_op.cc b/paddle/fluid/operators/merge_lod_tensor_op.cc index e832aca3c64e9c9d07fc95c6faa52a47ff6c003b..e5465db716271691aee57a956cf295d01058d6fd 100644 --- a/paddle/fluid/operators/merge_lod_tensor_op.cc +++ b/paddle/fluid/operators/merge_lod_tensor_op.cc @@ -179,15 +179,15 @@ class MergeLoDTensorInferShape : public framework::InferShapeBase { public: void operator()(framework::InferShapeContext *context) const override { PADDLE_ENFORCE(context->HasInput("X"), - "MergeLoDTensorOp must has input X."); + "MergeLoDTensorOp must have input X."); PADDLE_ENFORCE(context->HasInput("Mask"), - "MergeLoDTensorOp must has input Mask."); + "MergeLoDTensorOp must have input Mask."); PADDLE_ENFORCE(context->HasInput("InTrue"), - "MergeLoDTensorOp must has input InTrue."); + "MergeLoDTensorOp must have input InTrue."); PADDLE_ENFORCE(context->HasInput("InFalse"), - "MergeLoDTensorOp must has input InFalse."); + "MergeLoDTensorOp must have input InFalse."); PADDLE_ENFORCE(context->HasOutput("Out"), - "MergeLoDTensorOp must has output Out"); + "MergeLoDTensorOp must have output Out"); auto mask_dim = context->GetInputDim("Mask"); PADDLE_ENFORCE_EQ(mask_dim.size(), 2, diff --git a/paddle/fluid/operators/split_lod_tensor_op.cc b/paddle/fluid/operators/split_lod_tensor_op.cc index fedd8543ae803a1b99167ab835ca55865b096339..94916a9659cec4e1b574359dfcc8cd4bc5502763 100644 --- a/paddle/fluid/operators/split_lod_tensor_op.cc +++ b/paddle/fluid/operators/split_lod_tensor_op.cc @@ -147,13 +147,13 @@ class SplitLoDTensorInferShape : public framework::InferShapeBase { public: void operator()(framework::InferShapeContext *context) const override { PADDLE_ENFORCE(context->HasInput("X"), - "SplitLoDTensorOp must has input X."); + "SplitLoDTensorOp must have input X."); PADDLE_ENFORCE(context->HasInput("Mask"), - "SplitLoDTensorOp must has input Mask."); + "SplitLoDTensorOp must have input Mask."); PADDLE_ENFORCE(context->HasOutput("OutTrue"), - "SplitLoDTensorOp must has output OutTrue."); + "SplitLoDTensorOp must have output OutTrue."); PADDLE_ENFORCE(context->HasOutput("OutFalse"), - "SplitLoDTensorOp must has output OutFalse."); + "SplitLoDTensorOp must have output OutFalse."); auto mask_dim = context->GetInputDim("Mask"); PADDLE_ENFORCE_EQ(mask_dim.size(), 2, diff --git a/paddle/fluid/operators/split_selected_rows_op.cc b/paddle/fluid/operators/split_selected_rows_op.cc index b0217d93e9294f6cab264959e35f9c9c9896c2dc..7a3202617fc95cea4455a0a7b6feceb7c4751216 100644 --- a/paddle/fluid/operators/split_selected_rows_op.cc +++ b/paddle/fluid/operators/split_selected_rows_op.cc @@ -54,9 +54,10 @@ class SplitSelectedRowsOp : public framework::OperatorWithKernel { using framework::OperatorWithKernel::OperatorWithKernel; void InferShape(framework::InferShapeContext *ctx) const override { - PADDLE_ENFORCE(ctx->HasInput("X"), "SplitSelectedRowsOp must has input X."); + PADDLE_ENFORCE(ctx->HasInput("X"), + "SplitSelectedRowsOp must have input X."); PADDLE_ENFORCE(ctx->HasOutputs("Out"), - "SplitSelectedRowsOp must has output Out."); + "SplitSelectedRowsOp must have output Out."); } }; diff --git a/python/paddle/fluid/backward.py b/python/paddle/fluid/backward.py index 317c495643517969a4c65e784391519344f5e12f..fc58d2e1c717304973ad5adb2f7ecaed06d9e179 100644 --- a/python/paddle/fluid/backward.py +++ b/python/paddle/fluid/backward.py @@ -1057,7 +1057,7 @@ def append_backward(loss, be invoked once each time a new gradient operator is added into the program. The callable - object must has two input + object must have two input parameters: 'block' and 'context'. The 'block' is the :ref:`api_guide_Block_en` which the new gradient operator will diff --git a/python/paddle/fluid/evaluator.py b/python/paddle/fluid/evaluator.py index 80ac91575f633ecffbcfff7ad66111b01f86be46..5c8386af3a7ce4ba0c5faf7590a3d4a9ea7cf8eb 100644 --- a/python/paddle/fluid/evaluator.py +++ b/python/paddle/fluid/evaluator.py @@ -224,7 +224,7 @@ class EditDistance(Evaluator): Args: input: the sequences predicted by network. - label: the target sequences which must has same sequence count + label: the target sequences which must have same sequence count with input. ignored_tokens(list of int): Tokens that should be removed before calculating edit distance.