How to update the weight vector of a NetCon per time step
Posted: Mon Jan 03, 2022 11:15 pm
Hi, all
Happy New year
My question is how to update the weight vectors of NetCons per time step in a synapse PointProcess model.
To study metaplasticity, I defined the second and third elements of a NetCon's weight vector as two learning rates. I want my synapse PointProcess model with metaplasticity mechanisms to update those learning rates per time step in a clock manner. Multiple NetCons will be attached to my synapse model.
But it seems neither the DERIVATIVE nor the BREAKPOINT block can access those weight vectors. At least the FOR_NETCONS failed. My question is, can I do that?. If I can, how to do it.
I currently update those weight vector elements in an event-driven manner in the NET_RECEIVE block, it works. But eventually, I may design some metaplasticity model for which it's hard to find analytical solutions. So I prefer to update those weight vector elements in a time step manner.
Another solution may be to define those learning rates as state variables in a synapse model, then update them with DERIVATIVE and BREAKPOINT blocks. But in this case, each synapse PointProcess can only have one NetCon attached to it. It will be a waste.
################## explaining my question in the .mod file
BREAKPOINT {
SOLVE states METHOD cnexp
: can I access a_plus, a_minus of all NetCon connected with the synapse here?
}
DERIVATIVE states {
: can I access a_plus, a_minus of all NetCon connected with the synapse here?
}
NET_RECEIVE (w, a_plus, a_minus, trace_1 , trace_2, t_stamp) {
: Now I update a_plus, a_minus in an event-driven manner with a time stamp. Whenever there's a pre or post spike, I will update a_plus, a_minus with analytical solutions and update the time stamp.
:FOR_NETCONS works well here!
}
Happy New year
My question is how to update the weight vectors of NetCons per time step in a synapse PointProcess model.
To study metaplasticity, I defined the second and third elements of a NetCon's weight vector as two learning rates. I want my synapse PointProcess model with metaplasticity mechanisms to update those learning rates per time step in a clock manner. Multiple NetCons will be attached to my synapse model.
But it seems neither the DERIVATIVE nor the BREAKPOINT block can access those weight vectors. At least the FOR_NETCONS failed. My question is, can I do that?. If I can, how to do it.
I currently update those weight vector elements in an event-driven manner in the NET_RECEIVE block, it works. But eventually, I may design some metaplasticity model for which it's hard to find analytical solutions. So I prefer to update those weight vector elements in a time step manner.
Another solution may be to define those learning rates as state variables in a synapse model, then update them with DERIVATIVE and BREAKPOINT blocks. But in this case, each synapse PointProcess can only have one NetCon attached to it. It will be a waste.
################## explaining my question in the .mod file
BREAKPOINT {
SOLVE states METHOD cnexp
: can I access a_plus, a_minus of all NetCon connected with the synapse here?
}
DERIVATIVE states {
: can I access a_plus, a_minus of all NetCon connected with the synapse here?
}
NET_RECEIVE (w, a_plus, a_minus, trace_1 , trace_2, t_stamp) {
: Now I update a_plus, a_minus in an event-driven manner with a time stamp. Whenever there's a pre or post spike, I will update a_plus, a_minus with analytical solutions and update the time stamp.
:FOR_NETCONS works well here!
}