Skip to content

Build · Topology (graph)

regular

Generates a regular ring-lattice graph (each node has k neighbors).

regular

Connectivity and weight matrix on a small reservoir.
from resdag.layers import ESNLayer

reservoir = ESNLayer(500, feedback_size=3, recurrent_initializer='regular', spectral_radius=0.9, seed=7)
parameter default
k 3
directed False
self_loops False
random_weights True

Override parameters with recurrent_initializer=("regular", {...}) or pre-configure with get_recurrent_initializer("regular", ...). The existing topology= spelling and get_topology() also work.

A layer spectral_radius rescales this matrix after construction. Use get_recurrent_initializer(..., rescale=False) to keep the native scale.

See also