提交 436b6acc 编写于 作者: T typhoonzero

follow comments

上级 bf7bc127
...@@ -42,17 +42,17 @@ class AucOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -42,17 +42,17 @@ class AucOpMaker : public framework::OpProtoAndCheckerMaker {
AucOpMaker(framework::OpProto *proto, framework::OpAttrChecker *op_checker) AucOpMaker(framework::OpProto *proto, framework::OpAttrChecker *op_checker)
: OpProtoAndCheckerMaker(proto, op_checker) { : OpProtoAndCheckerMaker(proto, op_checker) {
AddInput("Inference", AddInput("Inference",
"A floating point `Tensor` of arbitrary shape and whose values" "A floating point tensor of arbitrary shape and whose values"
"are in the range `[0, 1]`."); "are in the range [0, 1].");
AddInput("Label", AddInput("Label",
"A `Tensor` whose shape matches " "A tensor whose shape matches "
"`Inference`. Will be cast to `bool`."); "Inference. Will be cast to bool.");
// TODO(typhoonzero): support weight input // TODO(typhoonzero): support weight input
AddOutput("AUC", AddOutput("AUC",
"A scalar `Tensor` representing the " "A scalar representing the "
"current area-under-curve."); "current area-under-curve.");
AddAttr<std::string>("curve", "Possible curves are ROC and PR") AddAttr<std::string>("curve", "Curve type, can be 'ROC' or 'PR'.")
.SetDefault("ROC"); .SetDefault("ROC");
AddAttr<int>("num_thresholds", AddAttr<int>("num_thresholds",
"The number of thresholds to use when discretizing the" "The number of thresholds to use when discretizing the"
...@@ -62,7 +62,8 @@ class AucOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -62,7 +62,8 @@ class AucOpMaker : public framework::OpProtoAndCheckerMaker {
AddComment( AddComment(
R"DOC(Computes the AUC according forward output and label. R"DOC(Computes the AUC according forward output and label.
Best to use for binary classification evaluations. Best to use for binary classification evaluations.
If `label` can be values other than 0 and 1, it will be cast
If input label contains values other than 0 and 1, it will be cast
to bool. to bool.
You can find the definations here: You can find the definations here:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册