提交 16a3d88a 编写于 作者: D dzhwinter

fix typo

上级 d516ace9
...@@ -54,10 +54,19 @@ be linearly scaled to make the L2 norm of $Out$ equal to $max\_norm$, as ...@@ -54,10 +54,19 @@ be linearly scaled to make the L2 norm of $Out$ equal to $max\_norm$, as
shown in the following formula: shown in the following formula:
$$ $$
Out = \frac{max\_norm * X}{norm(X)}, Out = \\frac{max\\_norm * X}{norm(X)},
$$ $$
where $norm(X)$ represents the L2 norm of $X$. where $norm(X)$ represents the L2 norm of $X$.
Examples:
.. code-block:: python
data = fluid.layer.data(
name='data', shape=[2, 4, 6], dtype='float32')
reshaped = fluid.layers.clip_by_norm(
x=data, max_norm=0.5)
)DOC"); )DOC");
} }
}; };
......
...@@ -866,6 +866,7 @@ def array_write(x, i, array=None): ...@@ -866,6 +866,7 @@ def array_write(x, i, array=None):
Variable: The output LOD_TENSOR_ARRAY where the input tensor is written. Variable: The output LOD_TENSOR_ARRAY where the input tensor is written.
Examples: Examples:
.. code-block::python .. code-block::python
tmp = fluid.layers.zeros(shape=[10], dtype='int32') tmp = fluid.layers.zeros(shape=[10], dtype='int32')
......
...@@ -3159,8 +3159,6 @@ def im2sequence(input, filter_size=1, stride=1, padding=0, name=None): ...@@ -3159,8 +3159,6 @@ def im2sequence(input, filter_size=1, stride=1, padding=0, name=None):
Examples: Examples:
As an example:
.. code-block:: text .. code-block:: text
Given: Given:
...@@ -3204,7 +3202,7 @@ def im2sequence(input, filter_size=1, stride=1, padding=0, name=None): ...@@ -3204,7 +3202,7 @@ def im2sequence(input, filter_size=1, stride=1, padding=0, name=None):
output.lod = [[0, 4, 8]] output.lod = [[0, 4, 8]]
The simple usage is: Examples:
.. code-block:: python .. code-block:: python
...@@ -3738,7 +3736,7 @@ def lrn(input, n=5, k=1.0, alpha=1e-4, beta=0.75, name=None): ...@@ -3738,7 +3736,7 @@ def lrn(input, n=5, k=1.0, alpha=1e-4, beta=0.75, name=None):
Output(i, x, y) = Input(i, x, y) / \left( Output(i, x, y) = Input(i, x, y) / \left(
k + \alpha \sum\limits^{\min(C, c + n/2)}_{j = \max(0, c - n/2)} k + \alpha \sum\limits^{\min(C, c + n/2)}_{j = \max(0, c - n/2)}
(Input(j, x, y))^2 \right)^{\beta} (Input(j, x, y))^2\right)^{\beta}
In the above equation: In the above equation:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册