-
Notifications
You must be signed in to change notification settings - Fork 86
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
Assertion error when calling sim.setWeight on 2 different neuron groups #65
Comments
In another case, again when trying to modify synapses between 2 different groups, there is no assertion error but I get: Even though I've set the connection probability to be 1.0 between the 2 groups (so the synapse should definitely exist) |
Here is a text file version of the project file I am having trouble with. The problem occurs first during the setWeight call on line 312 |
I think the following 2 lines (lines 1327-28 of snn_manager.cpp) might be the problem: int neurIdPreReal = groupConfigs[netId][lGrpId].lStartN + neurIdPre; Here, if I'm not mistaken, the first line is trying to find the real neuronID (not 0-indexed) of the presynaptic neuron. However it is using the lGrpID (what is this variable by the way?) found on line 1300 of snn_manager.cpp: int lGrpId = groupConfigMDMap[connectConfigMap[connId].grpDest].lGrpId; which is using .grpDest. Therefore I think this function is only looking for pre/post-synaptic neurons in the same group. Can you please confirm? Thanks! |
You are correct!! The bug has been fixed by d08722a . Thanks for report the bug. |
Thanks! I am still using an extremely inelegant and slow method for creating normally distributed connection weights (without using any topology). Is there a better way to do this already (or in an upcoming update)? It would be really nice if it was part of the sim.connect method. where WeightDistribution would be an object that holds the type of distribution (uniform, normal, exponential, etc.) and the relevant parameters (mean and/or standard deviation). Is something like this possible? |
I just got a new computer with 4 GPUs. I tried running the same simulation I had problems with above but assigned 2 groups to 3 different GPUs (So groups 1 & 2 on GPU 0, 3-4 on GPU 1, 5-6 on GPU2). This caused that same assertion error to be thrown when calling setWeight on a connection where the pre/post groups were assigned to different GPUs: void SNN::setWeight(short int, int, int, float, bool): Assertion `managerRuntimeData.connIdsPreIdx[pos_ij] == connId' failed. I'm not sure if this is a bug or by design. |
We don't have plan to implement weight distribution currently. It can be done by ConnectionGenerator, which is a callback function that allow users to define the connections. You may want to look into it.
|
I am trying to use sim.setWeight to apply a normal distribution to the synaptic weights between 2 neuron groups. However, when I call sim.setWeight I get the following assertion error:
carlsim/kernel/src/snn_manager.cpp:1337: void SNN::setWeight(short int, int, int, float, bool): Assertion `managerRuntimeData.connIdsPreIdx[pos_ij] == connId' failed.
It seems like the wrong connection ID is being retrieved, however I cannot seem to figure out what the variable pos_ij is and therefore can't figure out why the error is occurring (I tried printing pos_ij from snn_manager.cpp but nothing would print).
I believe I am giving the setWeight method the correct inputs (connection ID and 0-indexed neuron numbers), so I am thinking this may be a bug. Also, when calling setWeight on a connection from one neuron group to itself there is no problem, only when it is called on 2 separate neuron groups.
The text was updated successfully, but these errors were encountered: