Skip to content

Commit 4c10168

Browse files
authored
Merge pull request #15697 from luotao1/activation_op
fix generate doc error in activation ops
2 parents 81fdc28 + b357adc commit 4c10168

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

paddle/fluid/operators/activation_op.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ using paddle::framework::Tensor;
3737
"(bool, default false) Set to true for inference only, false " \
3838
"for training. Some layers may run faster when this is true.") \
3939
.SetDefault(false); \
40-
AddComment(#OP_COMMENT); \
40+
AddComment(OP_COMMENT); \
4141
} \
4242
}
4343

@@ -124,7 +124,7 @@ class ActivationOpGrad : public framework::OperatorWithKernel {
124124
UNUSED constexpr char SigmoidDoc[] = R"DOC(
125125
Sigmoid Activation Operator
126126
127-
$$out = \frac{1}{1 + e^{-x}}$$
127+
$$out = \\frac{1}{1 + e^{-x}}$$
128128
129129
)DOC";
130130

@@ -187,14 +187,14 @@ Abs Activation Operator.
187187
UNUSED constexpr char CeilDoc[] = R"DOC(
188188
Ceil Activation Operator.
189189
190-
$out = ceil(x)$
190+
$out = \left \lceil x \right \rceil$
191191
192192
)DOC";
193193

194194
UNUSED constexpr char FloorDoc[] = R"DOC(
195195
Floor Activation Operator.
196196
197-
$out = floor(x)$
197+
$out = \left \lfloor x \right \rfloor$
198198
199199
)DOC";
200200

@@ -252,7 +252,7 @@ Softplus Activation Operator.
252252
UNUSED constexpr char SoftsignDoc[] = R"DOC(
253253
Softsign Activation Operator.
254254
255-
$$out = \frac{x}{1 + |x|}$$
255+
$$out = \\frac{x}{1 + \|x\|}$$
256256
257257
)DOC";
258258

0 commit comments

Comments
 (0)