-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the annotations of layers.py #5517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this refining.
:type input: LayerOutput | ||
:param state: State Layer. :math:`c_{t-1}` | ||
:param state: The state of a lstm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The state of the LSTM unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
:type state: LayerOutput | ||
:param act: Activation type. TanhActivation is the default. | ||
:type act: BaseActivation | ||
:param gate_act: Gate Activation Type. SigmoidActivation is the default. | ||
:param gate_act: Activation type of the gate. SigmoidActivation is the default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default --> the default activation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
:type gate_act: BaseActivation | ||
:param state_act: State Activation Type. TanhActivation is the default. | ||
:param state_act: Activation type of the state. TanhActivation is the default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default --> the default activation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -3573,30 +3573,29 @@ def lstm_step_layer(input, | |||
|
|||
|
|||
This layer has two outputs. Default output is :math:`h_t`. The other | |||
output is :math:`o_t`, whose name is 'state' and can use | |||
output is :math:`o_t`, whose name is 'state' and users can use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default output --> The default output
it will be set to one-third of the dimension of the input automatically. | ||
:type size: int | ||
:param act: Activation type of this layer's output. SigmoidActivation | ||
is the default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default --> the default activation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -3910,7 +3928,7 @@ def recurrent_group(step, input, reverse=False, name=None, targetInlink=None): | |||
Recurrent layer group is an extremely flexible recurrent unit in | |||
PaddlePaddle. As long as the user defines the calculation done within a | |||
time step, PaddlePaddle will iterate such a recurrent calculation over | |||
sequence input. This is extremely usefull for attention based model, or | |||
sequence input. This is extremely useful for attention-based models, or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把这个 extremely 去掉~ 加上这个副词比较奇怪。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
:param step: recurrent one time step function.The input of this function is | ||
input of the group. The return of this function will be | ||
recurrent group's return value. | ||
:param step: A step function which will be executed every step. The input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be executed every step --> 这句话表意不明确,需要重新组织一下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
The recurrent group scatter a sequence into time steps. And | ||
for each time step, will invoke step function, and return | ||
a time step result. Then gather each time step of output into | ||
The recurrent group scatters a sequence into time steps. And |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The recurrent group scatters a sequence into separate time steps.
recurrent group 的这一段英文注释的表意还是难以被用户理解(英文描述的质量还是有些问题),这个PR可以先merge目前的修改,后面仍需针对性的完善一下。
@@ -4230,8 +4251,9 @@ def rnn_step(input): | |||
- machine translation : demo/seqToseq/translation/gen.conf \ | |||
demo/seqToseq/seqToseq_net.py | |||
|
|||
:param name: Name of the recurrent unit that generates sequences. | |||
:type name: base string | |||
:param name: The name of the recurrent unit that generates sequences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that generates sequences. --> that is responsible for generating sequences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
:type layer_attr: ExtraLayerAttribute | ||
:param coeff: The coefficient affects the gradient in the backward. | ||
:param coeff: The weight of the gradient in the back propagation. | ||
1.0 is the default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default --> the default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@lcy-seso