Skip to content

Build · Topology (matrix)

block_diagonal

Build a block-diagonal recurrent matrix of constant-valued blocks.

from resdag.layers import ESNLayer

reservoir = ESNLayer(500, feedback_size=3, topology="block_diagonal", spectral_radius=0.9)
parameter default
weight 1.0
block_size 1

Override any parameter with the tuple spec — topology=("block_diagonal", {...}) — or pre-configure with get_topology("block_diagonal", ...). Scaling to a target spectral radius happens after construction, whatever the source.

See also