自组织递归神经网络
sorn的Python项目详细描述
自组织递归神经网络
sorn是一类以生物脑可塑性机制为基础,通过神经可塑性机制模拟大脑皮层回路学习和适应能力的人工神经网络。
为了便于维护,示例用例和api(开发中)被移到https://github.com/Saran-nns/PySORN_0.1
要安装最新版本:
pipinstallsorn
库仍处于alpha阶段,因此您可能还希望从开发分支安装最新版本:
pipinstallgit+https://github.com/Saran-nns/sorn
依赖关系
sorn只支持python 3.5+。对于较旧的python版本,请使用官方python客户端
用法:
更新网络配置
导航到home/conda/envs/envname/lib/site packages/sorn
或者如果您不确定sorn的目录
运行
importsornsorn.__file__
查找SORN包的位置
然后,更新/编辑configuration.ini
塑性阶段
# Import fromsorn.sornimportRunSorn# Sample input inputs=[0.]# To simulate the network; matrices_dict,Exc_activity,Inh_activity,Rec_activity,num_active_connections=RunSorn(phase='Plasticity',matrices=None,time_steps=100).run_sorn(inputs)# To resume the simulation, load the matrices_dict from previous simulation;matrices_dict,Exc_activity,Inh_activity,Rec_activity,num_active_connections=RunSorn(phase='Plasticity',matrices=matrices_dict,time_steps=100).run_sorn(inputs)
培训阶段:
matrices_dict,Exc_activity,Inh_activity,Rec_activity,num_active_connections=RunSorn(phase='Training',matrices=matrices_dict,time_steps=100).run_sorn(inputs)
网络输出说明:
matrices_dict - Dictionary of connection weights ('Wee','Wei','Wie') , Excitatory network activity ('X'), Inhibitory network activities('Y'), Threshold values ('Te','Ti')
Exc_activity - Collection of Excitatory network activity of entire simulation period
Inh_activitsy - Collection of Inhibitory network activity of entire simulation period
Rec_activity - Collection of Recurrent network activity of entire simulation period
num_active_connections - List of number of active connections in the Excitatory pool at each time step
绘图函数示例
fromsorn.utilsimportPlotter# Plot weight distribution in the networkPlotter.weight_distribution(weights=matrices_dict['Wee'],bin_size=5,savefig=False)# Plot Spike train of all neurons in the networkPlotter.scatter_plot(spike_train=np.asarray(Exc_activity),savefig=False)Plotter.raster_plot(spike_train=np.asarray(Exc_activity),savefig=False)
样本统计分析函数
fromsorn.utilsimportStatistics#t-lagged auto correlation between neural activityStatistics.autocorr(firing_rates=[1,1,5,6,3,7],t=2)# Fano factor: To verify poissonian process in spike generation of neuron 10Statistics.fanofactor(spike_train=np.asarray(Exc_activity),neuron=10,window_size=10)
文章:
fromsorn.utilsimportStatistics#t-lagged auto correlation between neural activityStatistics.autocorr(firing_rates=[1,1,5,6,3,7],t=2)# Fano factor: To verify poissonian process in spike generation of neuron 10Statistics.fanofactor(spike_train=np.asarray(Exc_activity),neuron=10,window_size=10)
文章:
Lazar,A.(2009年)。自组织递归神经网络。计算神经科学前沿,3。https://doi.org/10.3389/neuro.10.023.2009
Hartmann,C.,Lazar,A.,Nessler,B.,和Triesch,J.(2015)。噪音在哪里?自发活动和神经变异性的关键特征是通过确定性网络中的学习产生的。《公共科学图书馆计算生物学》,11(12)。https://doi.org/10.1371/journal.pcbi.1004640
Del Papa,B.,Priesemann,V.,和Triesch,J.(2017年)。临界满足学习:自组织递归神经网络中的临界特征。公共科学图书馆一号,12(5)。https://doi.org/10.1371/journal.pone.0178683
Zheng,P.,Dimitrakakis,C.,和Triesch,J.(2013年)。网络自组织解释了皮层突触连接强度的统计和动态。《公共科学图书馆计算生物学》,9(1)。https://doi.org/10.1371/journal.pcbi.1002848
引用为:
萨兰拉吉·南布苏布拉曼尼亚。(2019年3月14日)。saran nns/sorn:sorn alpha(版本v0.2.1)。泽诺多。http://doi.org/10.5281/zenodo.2593681