Skip to content

Commit 16a3d88

Browse files
committed
fix typo
1 parent d516ace commit 16a3d88

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

paddle/fluid/operators/clip_by_norm_op.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,19 @@ be linearly scaled to make the L2 norm of $Out$ equal to $max\_norm$, as
5454
shown in the following formula:
5555
5656
$$
57-
Out = \frac{max\_norm * X}{norm(X)},
57+
Out = \\frac{max\\_norm * X}{norm(X)},
5858
$$
5959
6060
where $norm(X)$ represents the L2 norm of $X$.
61+
62+
Examples:
63+
.. code-block:: python
64+
65+
data = fluid.layer.data(
66+
name='data', shape=[2, 4, 6], dtype='float32')
67+
reshaped = fluid.layers.clip_by_norm(
68+
x=data, max_norm=0.5)
69+
6170
)DOC");
6271
}
6372
};

python/paddle/fluid/layers/control_flow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ def array_write(x, i, array=None):
866866
Variable: The output LOD_TENSOR_ARRAY where the input tensor is written.
867867
868868
Examples:
869+
869870
.. code-block::python
870871
871872
tmp = fluid.layers.zeros(shape=[10], dtype='int32')

python/paddle/fluid/layers/nn.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3159,8 +3159,6 @@ def im2sequence(input, filter_size=1, stride=1, padding=0, name=None):
31593159
31603160
Examples:
31613161
3162-
As an example:
3163-
31643162
.. code-block:: text
31653163
31663164
Given:
@@ -3204,7 +3202,7 @@ def im2sequence(input, filter_size=1, stride=1, padding=0, name=None):
32043202
32053203
output.lod = [[0, 4, 8]]
32063204
3207-
The simple usage is:
3205+
Examples:
32083206
32093207
.. code-block:: python
32103208
@@ -3738,7 +3736,7 @@ def lrn(input, n=5, k=1.0, alpha=1e-4, beta=0.75, name=None):
37383736
37393737
Output(i, x, y) = Input(i, x, y) / \left(
37403738
k + \alpha \sum\limits^{\min(C, c + n/2)}_{j = \max(0, c - n/2)}
3741-
(Input(j, x, y))^2 \right)^{\beta}
3739+
(Input(j, x, y))^2\right)^{\beta}
37423740
37433741
In the above equation:
37443742

0 commit comments

Comments
 (0)