Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the new Connector interface to all existing connection rules #548

Open
harisorgn opened this issue Feb 20, 2025 · 0 comments
Open

Comments

@harisorgn
Copy link
Member

The new interface for defining connection rules is summarized by the generic Connector constructor dispatch :

function Connector(blox_src::AbstractBlox, blox_dest::AbstractBlox; kwargs...)
w = generate_weight_param(blox_src, blox_dest; kwargs...)
eq = connection_equations(blox_src, blox_dest, w; kwargs...)
lr = connection_learning_rule(blox_src, blox_dest, w; kwargs...)
cb = connection_callbacks(blox_src, blox_dest; kwargs...)
affects_tuple = connection_spike_affects(blox_src, blox_dest, w)
sa = Dict(namespaced_nameof(blox_src) => to_vector(affects_tuple))
return Connector(
namespaced_nameof(blox_src),
namespaced_nameof(blox_dest);
equation = eq,
weight = w,
spike_affects = sa,
discrete_callbacks = cb,
learning_rule = lr
)
end

What needs to be done is to turn all existing dispatches of Connector constructors, i.e. all existing connection rules into dispatches of connection_equations , connection_learning_rule , connection_callbacks and connection_spike_affects.

This way one can more easily replace a part of an existing rule (e.g. the equations or the callbacks) with a new part and all of our connections will be aligned on the interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant