Skip to content

Commit 4d6f751

Browse files
committed
optimize comment test=develop
1 parent e33bf70 commit 4d6f751

File tree

1 file changed

+4
-10
lines changed
  • python/paddle/fluid/layers

1 file changed

+4
-10
lines changed

python/paddle/fluid/layers/nn.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8065,28 +8065,22 @@ def bilinear_tensor_product(x,
80658065
.. math::
80668066
out{i} = x * W_{i} * {y^\mathrm{T}}, i=0,1,...,size-1
80678067
8068-
In this formular:
8068+
In this formula:
80698069
- :math:`x`: the first input contains M elements, shape is [batch_size, M].
80708070
- :math:`y`: the second input contains N elements, shape is [batch_size, N].
80718071
- :math:`W_{i}`: the i-th learned weight, shape is [M, N]
80728072
- :math:`out{i}`: the i-th element of out, shape is [batch_size, size].
80738073
- :math:`y^\mathrm{T}`: the transpose of :math:`y_{2}`.
80748074
8075-
The simple usage is:
8076-
8077-
.. code-block:: python
8078-
8079-
tensor = bilinear_tensor_product(x=layer1, y=layer2, size=1000)
8080-
80818075
Args:
80828076
x (Variable): 2-D input tensor with shape [batch_size, M]
80838077
y (Variable): 2-D input tensor with shape [batch_size, N]
80848078
size (int): The dimension of this layer.
80858079
act (str, default None): Activation to be applied to the output of this layer.
80868080
name (str, default None): The name of this layer.
8087-
param_attr (ParamAttr|list of ParamAttr, default None): The parameter attribute for learnable
8081+
param_attr (ParamAttr, default None): The parameter attribute for the learnable w.
80888082
parameters/weights of this layer.
8089-
bias_attr (ParamAttr|list of ParamAttr, default None): The parameter attribute for the bias
8083+
bias_attr (ParamAttr, default None): The parameter attribute for the bias
80908084
of this layer. If it is set to False, no bias will be added to the output units.
80918085
If it is set to None, the bias is initialized zero. Default: None.
80928086
@@ -8096,7 +8090,7 @@ def bilinear_tensor_product(x,
80968090
Examples:
80978091
.. code-block:: python
80988092
8099-
position_tensor = fluid.layers.add_position_encoding(input=tensor)
8093+
tensor = bilinear_tensor_product(x=layer1, y=layer2, size=1000)
81008094
"""
81018095
helper = LayerHelper('bilinear_tensor_product', **locals())
81028096
dtype = helper.input_dtype('x')

0 commit comments

Comments
 (0)