pyFDN.ParamRef#

class pyFDN.ParamRef(name, module)[source]#

A reference to one parameter of one model.

Variables:
  • name (str) – The name it was resolved under.

  • module (flamo module) – The module holding the parameter. Bound at construction, so the ref keeps pointing at the same parameter no matter what a loss does with it.

__init__(name, module)#

Methods

__init__(name, module)

raw()

The parameter before the map -- what the optimizer actually steps.

value()

The parameter's mapped value, still attached to the autograd graph.

Attributes

shape

Shape of the mapped value (what a penalty actually sees).

trainable

name

module

module: Any#
name: str#
raw()[source]#

The parameter before the map – what the optimizer actually steps.

Usually the mapped value() is what you want. The pre-image is, when the map is the point: the RT in seconds behind an attenuation filter (AttenuationFilter), where the mapped value is the SOS bank designed from it.

Return type:

Tensor

property shape: tuple[int, ...]#

Shape of the mapped value (what a penalty actually sees).

property trainable: bool#
value()[source]#

The parameter’s mapped value, still attached to the autograd graph.

FLAMO stores a raw parameter and a map onto the value the system uses – e.g. a skew-symmetric matrix mapped onto SO(N). A penalty wants the mapped value (the actual feedback matrix), not the raw parameter.

Return type:

Tensor