Skip to content

Commit 20c8ff0

Browse files
committed
Add comments
1 parent d44dbc4 commit 20c8ff0

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

paddle/fluid/operators/random_crop_op.cc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ class RandomCropOp : public framework::OperatorWithKernel {
3232
class RandomCropOpMaker : public framework::OpProtoAndCheckerMaker {
3333
public:
3434
void Make() override {
35-
AddInput("X", "");
36-
AddOutput("Out", "");
37-
AddInput("Seed", "");
38-
AddOutput("SeedOut", "").AsDispensable();
39-
AddAttr<std::vector<int>>("shape", "");
40-
AddComment("");
35+
AddInput("X", "A batch of instances to random crop.");
36+
AddInput("Seed", "The random seed.");
37+
AddOutput("Out", "The cropped instance batch.");
38+
AddOutput("SeedOut", "The random seed after random cropping.")
39+
.AsDispensable();
40+
AddAttr<std::vector<int>>("shape", "The shape of a cropped instance.");
41+
AddComment(R"DOC(
42+
This operator takes a batch of instance, and do random cropping on each instance.
43+
It means that cropping positions differs on each instance, which is determined
44+
by an uniform random generator. All cropped instances have the same shape, which
45+
is determined by the operator's attribute 'shape'.
46+
)DOC");
4147
}
4248
};
4349

0 commit comments

Comments
 (0)