pyhgf.typing.vectorised.Layer#
- class pyhgf.typing.vectorised.Layer(state, params, weights_in, coupling_fn, add_constant_input, has_volatility_parent, is_input_layer, fully_connected, kind)[source]#
One layer of the vectorised deep network.
weights_inis the matrix connecting the layer below (child) into this layer (parent). The bottom layer (index 0) hasweights_in=Nonebecause no layer sits below it. Shape:(n_child, n_self[+1]); the optional+1column carries the bias whenadd_constant_input=True.- Parameters:
state (pyhgf.typing.vectorised.LayerState) – The per-layer state (see
LayerState).params (pyhgf.typing.vectorised.LayerParams) – The per-layer static parameters (see
LayerParams).weights_in (jax.Array | None) – The matrix connecting the layer below (child) into this layer, or None for the bottom layer.
coupling_fn (Callable) – The coupling function applied to the incoming weights.
add_constant_input (bool) – Whether a constant (bias) input column is appended to the weights.
has_volatility_parent (bool) – Whether the layer has a volatility parent.
is_input_layer (bool) – Whether the layer is the input (bottom) layer of the network.
fully_connected (bool) – Whether the incoming weights are fully connected.
kind (str) – The kind of layer, either
"volatile"or"binary".
- __init__(state, params, weights_in, coupling_fn, add_constant_input, has_volatility_parent, is_input_layer, fully_connected, kind)#
- Parameters:
state (LayerState)
params (LayerParams)
weights_in (Array | None)
coupling_fn (Callable)
add_constant_input (bool)
has_volatility_parent (bool)
is_input_layer (bool)
fully_connected (bool)
kind (str)
- Return type:
None
Methods
__init__(state, params, weights_in, ...)Attributes
stateparamsweights_incoupling_fnadd_constant_inputhas_volatility_parentis_input_layerfully_connectedkind