Comments (9)
1.怎么链式传递关系,在网络中直接写如下代码A=netrou(monitor='U'),B=netrou('monitor='U'),synab=(A,B),network1=(A,synab,B), C=netrou(monitor='U'),synbc=(B,C),network2=(B,synbc,C),network1.run(500,input={input,5(请问这个5是代表的电流吗)}),但是我们发现最终A\B\C的监视器中的monitors的电位U随时间的变化关系不符合神经元经过兴奋性突触和抑制型突触后电位的变化。
首先可以定义四个神经元群:
A = netrou(monitor='U')
B = netrou(monitor='U')
C = netrou(monitor='U')
D = netrou(monitor='U')
其次,定义突触连接:
A2B = syn(A, B)
B2C = syn(B, C)
C2D = syn(C, D)
最后定义网络:
net = bp.Network(A, B, C, D, A2B, B2C, C2D)
net.run(500,input={input,5(的确代表的是电流)})
2.如果需要对神经元群里面的单个神经元节点进行操作,比如A有5个神经元,B有5个神经元,我们想定制A的3个神经元和B的3个神经元是通过兴奋型突触连接,A的2个神经元和B的2个神经元是通过抑制型突触连接,请问这个在您的框架中是怎么实现的?
此时需要定制A2B 的突触逻辑:
class A2BSyn(bp.TwoEndConn):
def __init__(self, ....):
self.pre = A
self.post = B
def update(_t, _dt):
first_three = [0, 1, 2]
self.pre.spike[first_three] # 自定义什么操作
self.post.input[first_three]
last_two = [3, 4]
self.pre.spike[last_two ] # 自定义什么操作
self.post.input[last_two ]
更多内容可以查看 examples ,这样学习更快。
from brainpy.
好的,谢谢,之前我们表达的时候,定义了两个net,看来要定义一个network把所有的神经元和突触关系传进去。还有一个问题,想问一下,神经元之间传递的时候因为通过抑制型突触连接,那么突触后电位会被抑制导致变得很小,几乎成为一条直线,这样后续链式再做兴奋型突触连接就没变化了,请问怎么修改您的模型里面的参数降低抑制强度?
如图所示
from brainpy.
不太清楚你说的是哪个模型。也不是很了解你这个图内谁受到谁的抑制。
from brainpy.
`import brainpy as bp
import brainmodels
import matplotlib.pyplot as plt
from pylab import mpl
mpl.rcParams['font.sans-serif'] = ['STZhongsong']
mpl.rcParams['axes.unicode_minus'] = False
A= brainmodels.neurons.HH(5, monitors=['V'], name='A')
B= brainmodels.neurons.HH(5, monitors=['V'], name='B')
C= brainmodels.neurons.HH(5, monitors=['V'], name='C')
D= brainmodels.neurons.HH(5, monitors=['V'], name='D')
E= brainmodels.neurons.HH(5, monitors=['V'], name='E')
AB_A_syn = brainmodels.synapses.AMPA(A, B, bp.connect.all2all)
BC_G_syn = brainmodels.synapses.GABAa(B, C, bp.connect.all2all)
CD_G_syn = brainmodels.synapses.GABAa(C, D, bp.connect.all2all)
DE_A_syn = brainmodels.synapses.AMPA(D, E, bp.connect.all2all)
net = bp.Network(A, B, C, D, E,AB_A_syn , BC_G_syn ,
CD_G_syn , DE_A_syn )
net.run(duration=500., inputs=[('A.input', 4.)])
fig, gs = bp.visualize.get_figure(5, 1, 3, 8)
ax_A = fig.add_subplot(gs[0, 0])
plt.plot(A.mon.ts, A.mon.V,color='b')
plt.grid()
ax_Cortex.set_xlabel('Time (ms)')
ax_Cortex.set_ylabel('Membrane potential (mV)')
plt.legend()
ax_B = fig.add_subplot(gs[1, 0], sharey=ax_A)
plt.plot(B.mon.ts, B.mon.V)
plt.legend()
ax_GPe = fig.add_subplot(gs[2, 0], sharey=ax_A)
plt.plot(C.mon.ts, C.mon.V)
plt.legend()
ax_STN = fig.add_subplot(gs[3, 0], sharey=ax_A)
plt.plot(D.mon.ts, D.mon.V)
plt.legend()
ax_GPi_SNr = fig.add_subplot(gs[4, 0], sharey=ax_A)
plt.plot(E.mon.ts, E.mon.V)
plt.legend()
plt.savefig("myPicture9.png")
plt.show()`
如上所示,这是自己弄的一个网络,我们经过两个一个兴奋型突触和两个抑制型突触以及一个兴奋性突触,最后形成的网络是这样的。
最后的电位变化趋于0了
from brainpy.
不是趋于0,是变成静息电位了。
from brainpy.
这个结果是对的。iMSN对GPe具有抑制性作用,所以,GPe的膜电位在iMSN产生spike的同时有小幅度下降。但是GPe没有产生任何spike,所以对STN没有影响,也就是说,STN和GPi_SNR都没有接收任何输入电流,自然停留在静息电位。
from brainpy.
"""所以,GPe的膜电位在iMSN产生spike的同时有小幅度下降。但是GPe没有产生任何spike,所以对STN没有影响"""
我上面的代码我稍微改了下名字,但是流程出来的图就是下边的图。第一个的蓝色线的图是A的膜电位变化(因为是监视器A.mon.V不知道这里理解的对不对),第二个的紫色线的图是iMSN(也就是代码里的B)的膜电位变化,A对iMSN有兴奋作用,iMSN对GPe有抑制作用,这里我有几个疑问。
1.“小幅度下降“,可能是我不小心写错了其实那个标题,“iMSN神经团“其实是第二个紫色的图的名字,所以我不太理解你说的小幅度下降在图像中是怎么表现出来的,
2.在整个net网络中这个input是怎样的角色,“input是先传给A,然后A的输出传给B,B的输出传给C这样的过程”,还是说“这个input会传给A,然后A的输出+input传给B,B的输出加input传给C”这样的,
3.还有你说产生spike的同时,这个spike应该就是脉冲或者说活动电位,是那个尖峰还是下面那个去极化的上升趋势呢,
4.GPe没有产生任何spike,这里没有产生任何spike的原因,我猜测是iMSN抑制的太厉害了所以导致没有spike产生,有什么属性可以让GABAa抑制的没那么厉害,我尝试重新赋值g_max或者T_duration都没有作用,请问在上面的简单模型中该怎么修改参数呢,还是说需要再加input作为外部输入这个是以什么格式输入的呢?
from brainpy.
这个问题属于对模型理解的问题。BrainPy 提供关于模拟和分析的一些接口。上述问题可以更多咨询身边导师和同学。I will close this issue. Thanks~
from brainpy.
If you have problems not about the BrainPy, you can email to me. My email is [email protected]
from brainpy.
Related Issues (20)
- Support training of SNN networks HOT 3
- Much easier way to write control flows HOT 1
- Documentation of control flows
- Compatibility with other JAX libraries
- ``brainpy.math.TimeDelay`` supports more efficient `indices`
- Support veterization and parallerization for class objects HOT 1
- Delay variable updating in synapse models seems wired
- Runner for dynamical systems using adaptive integrators
- High-dimensional analysis ``brainpy.analysis.FixedPointFinder`` should be generalized to mutiple variables HOT 1
- Using the official example“Training a spiking neural network”, brainpy cannot call GPU acceleration HOT 6
- How to Use Synaptic Weights HOT 2
- A kind of 'delay_step' setting in synapse could cause an error HOT 1
- A error will arise when use a slice of a neuron group as post group of a synapse. HOT 1
- Implementation of online training algorithms of SNNs HOT 2
- Documentation for enhanced parallel simulation APIs
- FixedTotalNum as subclass of FixedNum maybe better? HOT 1
- ``DynamicalSystem`` as a function HOT 3
- ImportError and circular dependency issue when running a decision-making network simulation HOT 2
- jax version >= 0.4.9 is not supported HOT 1
- PoissonGroup.update() takes 1 positional argument but 2 were given HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brainpy.