未验证 提交 ce9d2a9e 编写于 作者: F Feiyu Chan 提交者: GitHub

fix 5 operator makers with typos which pass string literal to argument...

fix 5 operator makers with typos which pass string literal to argument 'generated', remove generated as parameter of AddAttr (#44935)
上级 2dfa88d2
...@@ -96,12 +96,10 @@ class OpProtoAndCheckerMaker { ...@@ -96,12 +96,10 @@ class OpProtoAndCheckerMaker {
template <typename T> template <typename T>
TypedAttrChecker<T> &AddAttr(const std::string &name, TypedAttrChecker<T> &AddAttr(const std::string &name,
const std::string &comment, const std::string &comment) {
bool generated = false) {
auto *attr = proto_->add_attrs(); auto *attr = proto_->add_attrs();
attr->set_name(name); attr->set_name(name);
attr->set_comment(comment); attr->set_comment(comment);
attr->set_generated(generated);
attr->set_type(AttrTypeID<T>()); attr->set_type(AttrTypeID<T>());
return op_checker_->AddAttrChecker<T>(name, attr); return op_checker_->AddAttrChecker<T>(name, attr);
} }
......
...@@ -109,7 +109,7 @@ class DistributeFpnProposalsOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -109,7 +109,7 @@ class DistributeFpnProposalsOpMaker : public framework::OpProtoAndCheckerMaker {
"The referring scale of FPN layer with" "The referring scale of FPN layer with"
" specified level"); " specified level");
AddAttr<bool>("pixel_offset", AddAttr<bool>("pixel_offset",
"(bool, default True),", "(bool, default True),"
"If true, im_shape pixel offset is 1.") "If true, im_shape pixel offset is 1.")
.SetDefault(true); .SetDefault(true);
AddComment(R"DOC( AddComment(R"DOC(
......
...@@ -82,7 +82,7 @@ class GenerateProposalsV2OpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -82,7 +82,7 @@ class GenerateProposalsV2OpMaker : public framework::OpProtoAndCheckerMaker {
"than this min_size."); "than this min_size.");
AddAttr<float>("eta", "The parameter for adaptive NMS."); AddAttr<float>("eta", "The parameter for adaptive NMS.");
AddAttr<bool>("pixel_offset", AddAttr<bool>("pixel_offset",
"(bool, default True),", "(bool, default True),"
"If true, im_shape pixel offset is 1.") "If true, im_shape pixel offset is 1.")
.SetDefault(true); .SetDefault(true);
AddComment(R"DOC( AddComment(R"DOC(
......
...@@ -85,7 +85,7 @@ class MatrixNMSOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -85,7 +85,7 @@ class MatrixNMSOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault(false); .SetDefault(false);
AddAttr<float>("gaussian_sigma", AddAttr<float>("gaussian_sigma",
"(float) " "(float) "
"Sigma for Gaussian decreasing function, only takes effect ", "Sigma for Gaussian decreasing function, only takes effect "
"when 'use_gaussian' is enabled.") "when 'use_gaussian' is enabled.")
.SetDefault(2.); .SetDefault(2.);
AddOutput("Out", AddOutput("Out",
......
...@@ -50,7 +50,7 @@ class GraphSampleNeighborsOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -50,7 +50,7 @@ class GraphSampleNeighborsOpMaker : public framework::OpProtoAndCheckerMaker {
AddOutput("Out_Eids", "The eids of the sample edges"); AddOutput("Out_Eids", "The eids of the sample edges");
AddAttr<int>( AddAttr<int>(
"sample_size", "sample_size",
"The sample size of graph sample neighbors method. ", "The sample size of graph sample neighbors method. "
"Set default value as -1, means return all neighbors of nodes.") "Set default value as -1, means return all neighbors of nodes.")
.SetDefault(-1); .SetDefault(-1);
AddAttr<bool>("return_eids", AddAttr<bool>("return_eids",
......
...@@ -34,7 +34,7 @@ class TDMChildOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -34,7 +34,7 @@ class TDMChildOpMaker : public framework::OpProtoAndCheckerMaker {
"information in the following format: item_id(shape=1), " "information in the following format: item_id(shape=1), "
"layer_id(shape=1), parent_id(shape=1), child_id(shape=child_nums)"); "layer_id(shape=1), parent_id(shape=1), child_id(shape=child_nums)");
AddAttr<int>("child_nums", AddAttr<int>("child_nums",
"child_nums(int)", "child_nums(int)"
"The child nums of one node, if the node hasn't enough child, " "The child nums of one node, if the node hasn't enough child, "
"it should padding 0 until child nums equal to child_nums"); "it should padding 0 until child nums equal to child_nums");
AddOutput("Child", AddOutput("Child",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册