未验证 提交 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 {
template <typename T>
TypedAttrChecker<T> &AddAttr(const std::string &name,
const std::string &comment,
bool generated = false) {
const std::string &comment) {
auto *attr = proto_->add_attrs();
attr->set_name(name);
attr->set_comment(comment);
attr->set_generated(generated);
attr->set_type(AttrTypeID<T>());
return op_checker_->AddAttrChecker<T>(name, attr);
}
......
......@@ -109,7 +109,7 @@ class DistributeFpnProposalsOpMaker : public framework::OpProtoAndCheckerMaker {
"The referring scale of FPN layer with"
" specified level");
AddAttr<bool>("pixel_offset",
"(bool, default True),",
"(bool, default True),"
"If true, im_shape pixel offset is 1.")
.SetDefault(true);
AddComment(R"DOC(
......
......@@ -82,7 +82,7 @@ class GenerateProposalsV2OpMaker : public framework::OpProtoAndCheckerMaker {
"than this min_size.");
AddAttr<float>("eta", "The parameter for adaptive NMS.");
AddAttr<bool>("pixel_offset",
"(bool, default True),",
"(bool, default True),"
"If true, im_shape pixel offset is 1.")
.SetDefault(true);
AddComment(R"DOC(
......
......@@ -85,7 +85,7 @@ class MatrixNMSOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault(false);
AddAttr<float>("gaussian_sigma",
"(float) "
"Sigma for Gaussian decreasing function, only takes effect ",
"Sigma for Gaussian decreasing function, only takes effect "
"when 'use_gaussian' is enabled.")
.SetDefault(2.);
AddOutput("Out",
......
......@@ -50,7 +50,7 @@ class GraphSampleNeighborsOpMaker : public framework::OpProtoAndCheckerMaker {
AddOutput("Out_Eids", "The eids of the sample edges");
AddAttr<int>(
"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.")
.SetDefault(-1);
AddAttr<bool>("return_eids",
......
......@@ -34,7 +34,7 @@ class TDMChildOpMaker : public framework::OpProtoAndCheckerMaker {
"information in the following format: item_id(shape=1), "
"layer_id(shape=1), parent_id(shape=1), child_id(shape=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, "
"it should padding 0 until child nums equal to child_nums");
AddOutput("Child",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册