Returns the computed params in current namescope. 'Computed params' are such parameters that are not optimized via gradient descent but are directly computed from data, such as the running mean and variance of Spatial Batch Normalization.
(self, namescope=None)
| 388 | assert dupes == [], "Duplicate params: {}".format(dupes) |
| 389 | |
| 390 | def GetComputedParams(self, namescope=None): |
| 391 | ''' |
| 392 | Returns the computed params in current namescope. 'Computed params' |
| 393 | are such parameters that are not optimized via gradient descent but are |
| 394 | directly computed from data, such as the running mean and variance |
| 395 | of Spatial Batch Normalization. |
| 396 | ''' |
| 397 | namescope = ModelHelper._NormalizeNamescope(namescope) |
| 398 | |
| 399 | if namescope == '': |
| 400 | return self._computed_params[:] |
| 401 | else: |
| 402 | return [p for p in self._computed_params |
| 403 | if p.GetNameScope().startswith(namescope)] |
| 404 | |
| 405 | def GetAllParams(self, namescope=None): |
| 406 | return self.GetParams(namescope) + self.GetComputedParams(namescope) |