提交 20c8ff0f 编写于 作者: F fengjiayi

Add comments

上级 d44dbc4a
...@@ -32,12 +32,18 @@ class RandomCropOp : public framework::OperatorWithKernel { ...@@ -32,12 +32,18 @@ class RandomCropOp : public framework::OperatorWithKernel {
class RandomCropOpMaker : public framework::OpProtoAndCheckerMaker { class RandomCropOpMaker : public framework::OpProtoAndCheckerMaker {
public: public:
void Make() override { void Make() override {
AddInput("X", ""); AddInput("X", "A batch of instances to random crop.");
AddOutput("Out", ""); AddInput("Seed", "The random seed.");
AddInput("Seed", ""); AddOutput("Out", "The cropped instance batch.");
AddOutput("SeedOut", "").AsDispensable(); AddOutput("SeedOut", "The random seed after random cropping.")
AddAttr<std::vector<int>>("shape", ""); .AsDispensable();
AddComment(""); AddAttr<std::vector<int>>("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");
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册