|
|
@ -43,9 +43,26 @@ def create(layers):
|
|
|
|
|
|
|
|
|
|
|
|
class Parameters(object):
|
|
|
|
class Parameters(object):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Parameters is a dictionary contains Paddle's parameter. The key of
|
|
|
|
`Parameters` manages all the learnable parameters in a neural network.
|
|
|
|
Parameters is the name of parameter. The value of Parameters is a plain
|
|
|
|
It stores parameters' information in an OrderedDict, key of which is
|
|
|
|
:code:`numpy.ndarry` .
|
|
|
|
the name of a parameter, and value related to a key is a parameter's
|
|
|
|
|
|
|
|
configuration, such as initialization mean and std, its size, whether it is
|
|
|
|
|
|
|
|
a static parameter, and so on.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:param __param_conf__: this member stores the configurations of learnable
|
|
|
|
|
|
|
|
parameters in a network in an OrderedDict. The parameters are added by
|
|
|
|
|
|
|
|
following their creation order in the neural network one by one:
|
|
|
|
|
|
|
|
parameters of the previous layers in a network are careted first.
|
|
|
|
|
|
|
|
When a user iterates over this dict, he can visit parameters in the
|
|
|
|
|
|
|
|
network from button to up.
|
|
|
|
|
|
|
|
:type __param_conf__: OrderedDict
|
|
|
|
|
|
|
|
:param __gradient_machines__: all of the parameters in a neural network are
|
|
|
|
|
|
|
|
appended to a Paddle gradient machine, which is used internally to copy
|
|
|
|
|
|
|
|
the parameter values between the C++ and Python end.
|
|
|
|
|
|
|
|
:type __gradient_machines__: list
|
|
|
|
|
|
|
|
:param __tmp_params__: a dict to store dummy parameters if no
|
|
|
|
|
|
|
|
__gradient_machines__ is appended to `Parameters`.
|
|
|
|
|
|
|
|
:type __tmp_params__: dict
|
|
|
|
|
|
|
|
|
|
|
|
Basically usage is
|
|
|
|
Basically usage is
|
|
|
|
|
|
|
|
|
|
|
|