Builder#

class brainpy.state.network.Builder(*args, **kwargs)#

Imperative variant of Network.

Use add(name, module) to register a population/device and connect(pre, post, rule=..., **params) to register a projection. Otherwise identical to Network.

add(name, module)[source]#

Register module as self.<name>; return the module.

connect(pre, post, *, rule, **kwargs)[source]#

Instantiate rule(pre, post, **kwargs) and register it.