follow comments.

del_some_in_makelist
caoying03 7 years ago
parent ebe4425ffa
commit a74db488f7

@ -467,7 +467,7 @@ lambda_cost
:noindex: :noindex:
square_error_cost square_error_cost
-------- -----------------
.. autoclass:: paddle.v2.layer.square_error_cost .. autoclass:: paddle.v2.layer.square_error_cost
:noindex: :noindex:
@ -533,7 +533,7 @@ Miscs
===== =====
dropout dropout
-------------- --------
.. autoclass:: paddle.v2.layer.dropout .. autoclass:: paddle.v2.layer.dropout
:noindex: :noindex:

File diff suppressed because it is too large Load Diff

@ -3,19 +3,19 @@ Nets
=========== ===========
simple_img_conv_pool simple_img_conv_pool
----------- --------------------
.. autofunction:: paddle.v2.fluid.nets.simple_img_conv_pool .. autofunction:: paddle.v2.fluid.nets.simple_img_conv_pool
:noindex: :noindex:
img_conv_group img_conv_group
----------- ---------------
.. autofunction:: paddle.v2.fluid.nets.img_conv_group .. autofunction:: paddle.v2.fluid.nets.img_conv_group
:noindex: :noindex:
sequence_conv_pool sequence_conv_pool
----------- ------------------
.. autofunction:: paddle.v2.fluid.nets.sequence_conv_pool .. autofunction:: paddle.v2.fluid.nets.sequence_conv_pool
:noindex: :noindex:

@ -18,7 +18,7 @@ SGDOptimizer
MomentumOptimizer MomentumOptimizer
----------- -----------------
.. automodule:: paddle.v2.fluid.optimizer .. automodule:: paddle.v2.fluid.optimizer
:members: MomentumOptimizer :members: MomentumOptimizer
:noindex: :noindex:
@ -26,14 +26,14 @@ MomentumOptimizer
AdagradOptimizer AdagradOptimizer
----------- ----------------
.. automodule:: paddle.v2.fluid.optimizer .. automodule:: paddle.v2.fluid.optimizer
:members: AdagradOptimizer :members: AdagradOptimizer
:noindex: :noindex:
AdamOptimizer AdamOptimizer
----------- -------------
.. automodule:: paddle.v2.fluid.optimizer .. automodule:: paddle.v2.fluid.optimizer
:members: AdamOptimizer :members: AdamOptimizer
:noindex: :noindex:
@ -47,7 +47,7 @@ AdamaxOptimizer
DecayedAdagradOptimizer DecayedAdagradOptimizer
----------- -----------------------
.. automodule:: paddle.v2.fluid.optimizer .. automodule:: paddle.v2.fluid.optimizer
:members: DecayedAdagradOptimizer :members: DecayedAdagradOptimizer
:noindex: :noindex:

@ -3,14 +3,14 @@ Regularizer
=========== ===========
WeightDecayRegularizer WeightDecayRegularizer
----------- ----------------------
.. automodule:: paddle.v2.fluid.regularizer .. automodule:: paddle.v2.fluid.regularizer
:members: WeightDecayRegularizer :members: WeightDecayRegularizer
:noindex: :noindex:
L2DecayRegularizer L2DecayRegularizer
----------- ------------------
.. automodule:: paddle.v2.fluid.regularizer .. automodule:: paddle.v2.fluid.regularizer
:members: L2DecayRegularizer :members: L2DecayRegularizer
:noindex: :noindex:
@ -18,7 +18,7 @@ L2DecayRegularizer
L1DecayRegularizer L1DecayRegularizer
----------- -------------------
.. automodule:: paddle.v2.fluid.regularizer .. automodule:: paddle.v2.fluid.regularizer
:members: L1DecayRegularizer :members: L1DecayRegularizer

@ -73,36 +73,35 @@ class MulOpMaker : public framework::OpProtoAndCheckerMaker {
public: public:
MulOpMaker(OpProto* proto, OpAttrChecker* op_checker) MulOpMaker(OpProto* proto, OpAttrChecker* op_checker)
: OpProtoAndCheckerMaker(proto, op_checker) { : OpProtoAndCheckerMaker(proto, op_checker) {
AddInput("X", "The first input tensor of the mul op."); AddInput("X", "(Tensor), The first input tensor of mul op.");
AddInput("Y", "The second input tensor of the mul op."); AddInput("Y", "(Tensor), The second input tensor of mul op.");
AddOutput("Out", "The output tensor of the mul op."); AddOutput("Out", "(Tensor), The output tensor of mul op.");
AddAttr<int>( AddAttr<int>(
"x_num_col_dims", "x_num_col_dims",
"(int, default 1) " R"DOC((int, default 1), The mul_op can take tensors with more than two
R"DOC(The mul_op can take tensors with more than two dimensions as its dimensions as its inputs. If the input $X$ is a tensor with more
inputs. If the input `X` is a tensor with more than two than two dimensions, $X$ will be flattened into a two-dimensional
dimensions, `X` will be flattened into a two-dimensional matrix matrix first. The flattening rule is: the first `num_col_dims`
first. The flattening rule is: the first `num_col_dims` will be will be flattened to form the first dimension of the final matrix
flattened to form the first dimension of the final matrix (height (the height of the matrix), and the rest `rank(X) - num_col_dims`
of the matrix), and the rest `rank(X) - num_col_dims` dimensions dimensions are flattened to form the second dimension of the final
are flattened to form the second dimension of the final matrix ( matrix (the width of the matrix). As a result, height of the
width of the matrix). As a result, height of the flattened matrix flattened matrix is equal to the product of $X$'s first
is equal to the product of `X`'s first `x_num_col_dims` dimensions' `x_num_col_dims` dimensions' sizes, and width of the flattened
sizes, and width of the flattened matrix is equal to the product matrix is equal to the product of $X$'s last `rank(x) - num_col_dims`
of `X`'s last `rank(x) - num_col_dims` dimensions' size. dimensions' size. For example, suppose $X$ is a 6-dimensional
For example, suppose `X` is a 6-dimensional tensor with the shape tensor with the shape [2, 3, 4, 5, 6], and `x_num_col_dims` = 3.
[2, 3, 4, 5, 6], and `x_num_col_dims` = 3. Then, the flattened Thus, the flattened matrix will have a shape [2 x 3 x 4, 5 x 6] =
matrix will have a shape [2 x 3 x 4, 5 x 6] = [24, 30]. [24, 30].
)DOC") )DOC")
.SetDefault(1) .SetDefault(1)
.EqualGreaterThan(1); .EqualGreaterThan(1);
AddAttr<int>( AddAttr<int>(
"y_num_col_dims", "y_num_col_dims",
"(int, default 1) " R"DOC((int, default 1), The mul_op can take tensors with more than two,
R"DOC(The mul_op can take tensors with more than two dimensions as its dimensions as its inputs. If the input $Y$ is a tensor with more
inputs. If the input `Y` is a tensor with more than two than two dimensions, $Y$ will be flattened into a two-dimensional
dimensions, `Y` will be flatten into a two-dimensional matrix matrix first. The attribute `y_num_col_dims` determines how $Y$ is
first. The attribute `y_num_col_dims` determines how `Y` is
flattened. See comments of `x_num_col_dims` for more details. flattened. See comments of `x_num_col_dims` for more details.
)DOC") )DOC")
.SetDefault(1) .SetDefault(1)
@ -110,14 +109,14 @@ class MulOpMaker : public framework::OpProtoAndCheckerMaker {
AddComment(R"DOC( AddComment(R"DOC(
Mul Operator. Mul Operator.
This operator is used to perform matrix multiplication for input X and Y. This operator is used to perform matrix multiplication for input $X$ and $Y$.
The equation is: The equation is:
$$Out = X * Y$$ $$Out = X * Y$$
Both the input `X` and `Y` can carry the LoD (Level of Details) information, Both the input $X$ and $Y$ can carry the LoD (Level of Details) information,
or not. But the output only shares the LoD information with input `X`. or not. But the output only shares the LoD information with input $X$.
)DOC"); )DOC");
} }

@ -40,7 +40,8 @@ def fc(input,
This process can be formulated as follows: This process can be formulated as follows:
.. math:: .. math::
Out = Act({\sum_{i=0}^{N-1}W_iX_i + b})
Out = Act\left({\sum_{i=0}^{N-1}W_iX_i + b}\right)
In the above equation: In the above equation:
@ -48,8 +49,8 @@ def fc(input,
* :math:`X_i`: The input tensor. * :math:`X_i`: The input tensor.
* :math:`W`: The weights created by this layer. * :math:`W`: The weights created by this layer.
* :math:`b`: The bias parameter created by this layer (if needed). * :math:`b`: The bias parameter created by this layer (if needed).
* :math`Act`: The activation funtion. * :math:`Act`: The activation funtion.
* :math`Out`: The output tensor. * :math:`Out`: The output tensor.
Args: Args:
input(Variable|list): The input tensor(s) to the fully connected layer. input(Variable|list): The input tensor(s) to the fully connected layer.

Loading…
Cancel
Save