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

Inconsistent "include_self" flag in "brainpy._src.dynold.synapses._TwoEndConnAlignPre" and "brainpy._src.dnn.linear.AllToAll" #466

Closed
2 tasks done
CloudyDory opened this issue Aug 31, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@CloudyDory
Copy link
Contributor

CloudyDory commented Aug 31, 2023

  • Check for duplicate issues.
  • Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:

When passing brainpy.conn.All2All(include_self=False) into brainpy.synapses.AMPA class, the include_self=False flag seems to be silently ignored.

Running the following code:

import brainpy as bp

E = bp.neurons.HH(size=4)
Synapse = bp.synapses.AMPA(E, E, bp.conn.All2All(include_self=False))

print(Synapse.conn.include_self)
print(Synapse.comm.include_self)

outputs:

False
True

And it seems that when computing the synaptic current, setting include_self to True or False makes no difference.

@CloudyDory CloudyDory added the bug Something isn't working label Aug 31, 2023
@chaoming0625
Copy link
Collaborator

chaoming0625 commented Aug 31, 2023

Thank you for your report. This is a bug.

The error is caused by the following line, which does not initialize a correct AllToAll connection.

self.comm = linear.AllToAll(pre.num, post.num, g_max)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants