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)
| 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 |
no test coverage detected