@@ -3380,6 +3380,7 @@ def reshape(x, shape, actual_shape=None, act=None, inplace=True, name=None):
33803380
33813381 Examples:
33823382 .. code-block:: python
3383+
33833384 data = fluid.layers.data(
33843385 name='data', shape=[2, 4, 6], dtype='float32')
33853386 reshaped = fluid.layers.reshape(
@@ -3585,12 +3586,13 @@ def lrn(input, n=5, k=1.0, alpha=1e-4, beta=0.75, name=None):
35853586
35863587def pad (x , paddings , pad_value = 0. , name = None ):
35873588 """
3588- Pads a tensor with a constant value given by :attr:pad_value, and the
3589- padded width is specified by :attr:paddings.
3589+ Pads a tensor with a constant value given by :attr:` pad_value` , and the
3590+ padded width is specified by :attr:` paddings` .
35903591
3591- Specifically, the number of values padded before each dimension
3592- :attr:i is indicated by :attr:paddings[i], and the number of values padded
3593- after each dimension :attr:i is indicated by :attr:paddings[i+1].
3592+ Specifically, the number of values padded before the contents of :attr:`x`
3593+ in dimension :attr:`i` is indicated by :attr:`paddings[i]`, and the number
3594+ of values padded after the contents of :attr:`x` in dimension :attr:`i` is
3595+ indicated by :attr:`paddings[i+1]`.
35943596
35953597 See below for an example.
35963598
@@ -3624,6 +3626,7 @@ def pad(x, paddings, pad_value=0., name=None):
36243626
36253627 Examples:
36263628 .. code-block:: python
3629+
36273630 # x is a rank 2 tensor variable.
36283631 out = fluid.layers.pad(
36293632 x=x, paddings=[0, 1, 1, 2], pad_value=0.)
0 commit comments