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_in is the matrix connecting the layer below (child) into this layer (parent). The bottom layer (index 0) has weights_in=None because no layer sits below it. Shape: (n_child, n_self[+1]); the optional +1 column carries the bias when add_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:
Return type:

None

Methods

__init__(state, params, weights_in, ...)

Attributes

state

params

weights_in

coupling_fn

add_constant_input

has_volatility_parent

is_input_layer

fully_connected

kind