diff --git a/paddle/fluid/operators/reader/create_custom_reader_op.cc b/paddle/fluid/operators/reader/create_custom_reader_op.cc index f03b3473ad3ec7e133d2db24d2902726d67dc02a..2bf3230db240fc2b878cbf2825e26dec81452a24 100644 --- a/paddle/fluid/operators/reader/create_custom_reader_op.cc +++ b/paddle/fluid/operators/reader/create_custom_reader_op.cc @@ -68,12 +68,25 @@ class CreateCustomReaderOp : public framework::OperatorBase { class CreateCustomReaderOpMaker : public DecoratedReaderMakerBase { protected: void Apply() override { - AddAttr("sub_block", ""); - AddAttr>("source_var_names", ""); - AddAttr>("sink_var_names", ""); + AddAttr( + "sub_block", "The block to hold all preprocessing operators."); + AddAttr>( + "source_var_names", + "Source variables are starting points of data preprocessing. They hold " + "preprocessing's input tensors. Each source variable corresponds to " + "one of underlying reader's output datas."); + AddAttr>( + "sink_var_names", + "Sink variables are ending points of data preprocessing. They hold " + "preprocessing's output tensors. Each sink variable corresponds to " + "one of custom reader's output datas."); AddComment(R"DOC( CreateCustomReader Operator + A custom reader can be used for input data preprocessing. + A custom reader holds its own sub-block, which will be executed in its + 'ReadNext()' function. Users can configurate their own preprocessing + pipelines by inserting operators into custom reader's sub-block. )DOC"); } };