未验证 提交 d9270e34 编写于 作者: T Tao Luo 提交者: GitHub

Merge pull request #15691 from luotao1/activation_doc

fix generate doc error in activation ops
...@@ -37,7 +37,7 @@ using paddle::framework::Tensor; ...@@ -37,7 +37,7 @@ using paddle::framework::Tensor;
"(bool, default false) Set to true for inference only, false " \ "(bool, default false) Set to true for inference only, false " \
"for training. Some layers may run faster when this is true.") \ "for training. Some layers may run faster when this is true.") \
.SetDefault(false); \ .SetDefault(false); \
AddComment(#OP_COMMENT); \ AddComment(OP_COMMENT); \
} \ } \
} }
...@@ -124,7 +124,7 @@ class ActivationOpGrad : public framework::OperatorWithKernel { ...@@ -124,7 +124,7 @@ class ActivationOpGrad : public framework::OperatorWithKernel {
UNUSED constexpr char SigmoidDoc[] = R"DOC( UNUSED constexpr char SigmoidDoc[] = R"DOC(
Sigmoid Activation Operator Sigmoid Activation Operator
$$out = \frac{1}{1 + e^{-x}}$$ $$out = \\frac{1}{1 + e^{-x}}$$
)DOC"; )DOC";
...@@ -187,14 +187,14 @@ $out = |x|$ ...@@ -187,14 +187,14 @@ $out = |x|$
UNUSED constexpr char CeilDoc[] = R"DOC( UNUSED constexpr char CeilDoc[] = R"DOC(
Ceil Activation Operator. Ceil Activation Operator.
$out = ceil(x)$ $out = \left \lceil x \right \rceil$
)DOC"; )DOC";
UNUSED constexpr char FloorDoc[] = R"DOC( UNUSED constexpr char FloorDoc[] = R"DOC(
Floor Activation Operator. Floor Activation Operator.
$out = floor(x)$ $out = \left \lfloor x \right \rfloor$
)DOC"; )DOC";
...@@ -252,7 +252,7 @@ $out = \ln(1 + e^{x})$ ...@@ -252,7 +252,7 @@ $out = \ln(1 + e^{x})$
UNUSED constexpr char SoftsignDoc[] = R"DOC( UNUSED constexpr char SoftsignDoc[] = R"DOC(
Softsign Activation Operator. Softsign Activation Operator.
$$out = \frac{x}{1 + |x|}$$ $$out = \\frac{x}{1 + \|x\|}$$
)DOC"; )DOC";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册