MCPcopy Create free account
hub / github.com/apache/singa / get_params

Method get_params

python/singa/layer.py:111–123  ·  view source on GitHub ↗

Get parameters of this layer and all sublayers Returns: parameters(dict): A dictionary contains parameter names and values of this layer and all sublayers.

(self)

Source from the content-addressed store, hash-verified

109 return self.forward(*args, **kwargs)
110
111 def get_params(self):
112 """ Get parameters of this layer and all sublayers
113
114 Returns:
115 parameters(dict): A dictionary contains parameter names
116 and values of this layer and all sublayers.
117 """
118 params = dict()
119 sublayers = self._layers
120 for name, sublayer in sublayers.items():
121 if sublayer._initialized:
122 params.update(sublayer.get_params())
123 return params
124
125 def set_params(self, parameters):
126 """ Set parameters for this layer and all sublayers

Callers 1

get_statesMethod · 0.95

Calls 2

updateMethod · 0.45
get_paramsMethod · 0.45

Tested by

no test coverage detected