pyhgf.updates.vectorised.learning.vectorised_synaptic_uncertainty_update#

pyhgf.updates.vectorised.learning.vectorised_synaptic_uncertainty_update(weights, precision_delta, gradient, importance, settings)[source]#

One weight matrix’s belief update: new mean, new accumulated precision.

The rule is stated in resolve_synaptic_uncertainty_settings(). A LayerStack carries a leading slice axis on every operand, which the ellipsis broadcasting here handles unchanged.

Parameters:
  • weights (Array) – The belief means, i.e. the element’s weights_mean.

  • precision_delta (Array) – The accumulated precision above the prior, same shape.

  • gradient (Array) – The descent gradient, same shape.

  • importance – Either the factor pair (p, q) of learning_weights_vectorised(), batch-averaged, whose outer product is the increment; or a full increment matrix of the weights’ shape, which is the exact batch contraction the evidence pass delivers.

  • settings (SynapticUncertaintySettings) – The resolved settings.

Returns:

The updated weights and the updated accumulated precision.

Return type:

tuple of jnp.ndarray