提交 696b1f5f 编写于 作者: Y yangyaming

Refine doc.

上级 076dcb9b
......@@ -70,14 +70,14 @@ class SmoothL1LossOpMaker : public framework::OpProtoAndCheckerMaker {
AddOutput("diff", "Intermediate variable to cache Win*(X-Y).")
.AsIntermediate();
AddOutput("Out", "Final smooth l1 loss of inputs.");
AddAttr<AttrType>("sigma", "Hyper parameter, default value is 3.0 .")
.SetDefault(3.0);
AddComment(R"DOC(
Compute SmoothL1Loss for input and target.
The equation is: Out = 0.5 * (sigma * (X - Y)) ^ 2 if abs(X - Y) < 1 / sigma^2
abs(X - Y) - 0.5 / sigma^2 otherwise
The equation is:
loss = 0.5 * (sigma * (x - y)) ^ 2 if abs(x - y) < 1 / sigma^2
abs(x - y) - 0.5 / sigma^2 otherwise
)DOC");
AddAttr<AttrType>("sigma", "Hyper parameter, default value is 3.0 .")
.SetDefault(3.0);
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册