pyhgf.typing.vectorised.VectorisedNetwork#

class pyhgf.typing.vectorised.VectorisedNetwork(layers, volatility_updates, max_posterior_precision, precision_clipping_value=1e-06, update_input_layer=False, predict_precision=True, feedforward_uncertainty=False, mean_field_updates=False)[source]#

Complete vectorised network state.

time_step is not stored on the network — it is passed as a per-step input to propagation_step, matching the nodalised backend’s input_data(time_steps=...) API.

Optimiser state lives in a separate optax opt-state carried alongside VectorisedNetwork in the scan carry; it is not part of the network PyTree.

layers is a mixed tuple of Layer and LayerStack elements.

Parameters:
  • layers (tuple) – A mixed tuple of Layer and LayerStack elements, ordered from the bottom (input) layer to the top.

  • volatility_updates (str) – The volatility update scheme, e.g. "unbounded".

  • max_posterior_precision (float) – The maximum posterior precision used to clip the precision updates.

  • update_input_layer (bool) – Whether the sweeps reach the top (input) layer — see pyhgf.model.DeepNetwork.

  • predict_precision (bool) – Whether the prediction sweep advances the precisions — see pyhgf.updates.vectorised.volatile.prediction.vectorised_layer_prediction().

  • feedforward_uncertainty (bool) – Whether value parents propagate their uncertainty to their children’s predicted precision — see pyhgf.model.DeepNetwork.

  • mean_field_updates (bool) – If False (default), use the relaxed prediction and posterior updates. If True, use the original mean-field updates — see pyhgf.model.DeepNetwork.

  • precision_clipping_value (float)

__init__(layers, volatility_updates, max_posterior_precision, precision_clipping_value=1e-06, update_input_layer=False, predict_precision=True, feedforward_uncertainty=False, mean_field_updates=False)#
Parameters:
  • layers (tuple)

  • volatility_updates (str)

  • max_posterior_precision (float)

  • precision_clipping_value (float)

  • update_input_layer (bool)

  • predict_precision (bool)

  • feedforward_uncertainty (bool)

  • mean_field_updates (bool)

Return type:

None

Methods

__init__(layers, volatility_updates, ...[, ...])

get_layer_sizes()

Per-element node count (one entry per Layer / LayerStack).

weights_tuple()

Per-element weights_mean tuple, matched 1:1 to self.layers.

Attributes

feedforward_uncertainty

mean_field_updates

n_layers

Number of elements (Layer or LayerStack) in the network.

n_total_slices

Total unrolled layer count, expanding every LayerStack.

params

Per-layer LayerParams tuple.

precision_clipping_value

predict_precision

update_input_layer

weights

Tuple of weight matrices (legacy view).

layers

volatility_updates

max_posterior_precision