From 20c8ff0f5f85b372ca92d7c81558fbe2a187d1fd Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Mon, 28 May 2018 15:58:46 +0800 Subject: [PATCH] Add comments --- paddle/fluid/operators/random_crop_op.cc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/operators/random_crop_op.cc b/paddle/fluid/operators/random_crop_op.cc index b9367f1d2..d92b8bbbb 100644 --- a/paddle/fluid/operators/random_crop_op.cc +++ b/paddle/fluid/operators/random_crop_op.cc @@ -32,12 +32,18 @@ class RandomCropOp : public framework::OperatorWithKernel { class RandomCropOpMaker : public framework::OpProtoAndCheckerMaker { public: void Make() override { - AddInput("X", ""); - AddOutput("Out", ""); - AddInput("Seed", ""); - AddOutput("SeedOut", "").AsDispensable(); - AddAttr>("shape", ""); - AddComment(""); + AddInput("X", "A batch of instances to random crop."); + AddInput("Seed", "The random seed."); + AddOutput("Out", "The cropped instance batch."); + AddOutput("SeedOut", "The random seed after random cropping.") + .AsDispensable(); + AddAttr>("shape", "The shape of a cropped instance."); + AddComment(R"DOC( + This operator takes a batch of instance, and do random cropping on each instance. + It means that cropping positions differs on each instance, which is determined + by an uniform random generator. All cropped instances have the same shape, which + is determined by the operator's attribute 'shape'. + )DOC"); } }; -- GitLab