Bunch

experimental.network_dynamics.Bunch()

Dictionary with attribute access for parameters.

A JAX PyTree-compatible parameter container that allows both dict[‘key’] and dict.key access patterns. Designed for neural dynamics parameters with support for JAX transformations.

Examples: >>> params = Bunch(a=1.0, b=2.0) >>> params.a # attribute access 1.0 >>> params[‘b’] # dict access 2.0 >>> jax.tree.map(lambda x: x * 2, params) # JAX transformations Bunch(a=2.0, b=4.0)

Methods

Name Description
copy Structurally copy this Bunch and any nested PyTree containers.

copy

experimental.network_dynamics.Bunch.copy()

Structurally copy this Bunch and any nested PyTree containers.

Rebuilds every container (nested Bunch, graph object, …) so mutating the copy – including plain attribute assignment like cfg.graph.delays = x – does not leak back into the original. Leaves (arrays, scalars, PRNG keys) are immutable in JAX, so sharing them is safe and avoids duplicating large arrays (graph weights, history buffers, pre-sampled noise tensors). Same operation as solve.py’s _snapshot, exposed here as .copy() so it works for ad-hoc config mutation outside prepare().