MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / set_params

Method set_params

numpy_ml/neural_nets/layers/layers.py:4403–4421  ·  view source on GitHub ↗

Set the layer parameters from a dictionary of values. Parameters ---------- summary_dict : dict A dictionary of layer parameters and hyperparameters. If a required parameter or hyperparameter is not included within `summary_dict`,

(self, summary_dict)

Source from the content-addressed store, hash-verified

4401 self.cell.unfreeze()
4402
4403 def set_params(self, summary_dict):
4404 """
4405 Set the layer parameters from a dictionary of values.
4406
4407 Parameters
4408 ----------
4409 summary_dict : dict
4410 A dictionary of layer parameters and hyperparameters. If a required
4411 parameter or hyperparameter is not included within `summary_dict`,
4412 this method will use the value in the current layer's
4413 :meth:`summary` method.
4414
4415 Returns
4416 -------
4417 layer : :doc:`Layer <numpy_ml.neural_nets.layers>` object
4418 The newly-initialized layer.
4419 """
4420 self = super().set_params(summary_dict)
4421 return self.cell.set_parameters(summary_dict)
4422
4423 def flush_gradients(self):
4424 """Erase all the layer's derived variables and gradients."""

Callers

nothing calls this directly

Calls 1

set_paramsMethod · 0.45

Tested by

no test coverage detected