Skip to content

Commit 98ab2b4

Browse files
committed
polish doc: softshrink, assign, shuffle
1 parent f9bebfe commit 98ab2b4

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

paddle/fluid/operators/activation_op.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,14 @@ class SoftShrinkOpMaker : public framework::OpProtoAndCheckerMaker {
252252
AddOutput("Out", "Output of Softshrink operator");
253253
AddAttr<float>("lambda", "non-negative offset").SetDefault(0.5f);
254254
AddComment(R"DOC(
255-
Softshrink Activation Operator.
256-
257-
$$
258-
out = \begin{cases}
259-
x - \lambda, \text{if } x > \lambda \\
260-
x + \lambda, \text{if } x < -\lambda \\
261-
0, \text{otherwise}
262-
\end{cases}
263-
$$
255+
:strong:`Softshrink Activation Operator`
256+
257+
.. math::
258+
out = \begin{cases}
259+
x - \lambda, \text{if } x > \lambda \\
260+
x + \lambda, \text{if } x < -\lambda \\
261+
0, \text{otherwise}
262+
\end{cases}
264263
265264
)DOC");
266265
}

python/paddle/fluid/layers/io.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ def __create_unshared_decorated_reader__(op_type, reader, attrs, name=None):
544544

545545

546546
def shuffle(reader, buffer_size):
547+
"""
548+
Shuffle the reader.
549+
"""
547550
return __create_unshared_decorated_reader__(
548551
'create_shuffle_reader', reader, {'buffer_size': int(buffer_size)})
549552

python/paddle/fluid/layers/tensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def assign(input, output):
191191
192192
Examples:
193193
.. code-block:: python
194+
194195
out = fluid.layers.create_tensor(dtype='float32')
195196
hidden = fluid.layers.fc(input=data, size=10)
196197
fluid.layers.assign(hidden, out)

0 commit comments

Comments
 (0)