• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python brainscales.run函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pyNN.hardware.brainscales.run函数的典型用法代码示例。如果您正苦于以下问题:Python run函数的具体用法?Python run怎么用?Python run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了run函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_SpikeSourceArray

 def test_SpikeSourceArray(self):
     spike_times = [50.0]
     p = sim.Population(3, sim.SpikeSourceArray(spike_times=spike_times))
     p2 = sim.Population(3, sim.Hardware_IF_cond_exp())
     syn = sim.StaticSynapse(weight=0.012)
     con = sim.Projection(p, p2, connector=sim.OneToOneConnector(), synapse_type=syn, receptor_type="excitatory")
     spike_times_g = p.get("spike_times")
     p2.record("v")
     sim.run(100.0)
     weights = nan_to_num(con.get("weight", format="array"))
     print weights
     data = p2.get_data().segments[0]
     vm = data.filter(name="v")[0]
     print vm
     Figure(
         Panel(
             weights, data_labels=["ext->cell"], line_properties=[{"xticks": True, "yticks": True, "cmap": "Greys"}]
         ),
         Panel(
             vm,
             ylabel="Membrane potential (mV)",
             data_labels=["excitatory", "excitatory"],
             line_properties=[{"xticks": True, "yticks": True}],
         ),
     ).save("result")
开发者ID:JoelChavas,项目名称:PyNN,代码行数:25,代码来源:test_hardware_brainscales.py


示例2: test_print_v

 def test_print_v(self):
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record_v()
     sim.run(10.0)
     a.write_data = Mock()
     a.print_v("foo.txt")
     a.write_data.assert_called_with('foo.txt', 'v', True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:9,代码来源:test_assembly.py


示例3: test_get_gsyn

 def test_get_gsyn(self):
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record_gsyn()
     sim.run(10.0)
     a.get_data = Mock()
     a.get_gsyn()
     a.get_data.assert_called_with(['gsyn_exc', 'gsyn_inh'], True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:9,代码来源:test_assembly.py


示例4: test_getSpikes

 def test_getSpikes(self):
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record('spikes')
     sim.run(10.0)
     a.get_data = Mock()
     a.getSpikes()
     a.get_data.assert_called_with('spikes', True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:9,代码来源:test_assembly.py


示例5: test_printSpikes

 def test_printSpikes(self):
     # TODO: implement assert_deprecated
     p1 = sim.Population(11, sim.IF_cond_exp())
     p2 = sim.Population(11, sim.IF_cond_exp())
     a = sim.Assembly(p1, p2, label="test")
     a.record('spikes')
     sim.run(10.0)
     a.write_data = Mock()
     a.printSpikes("foo.txt")
     a.write_data.assert_called_with('foo.txt', 'spikes', True)
开发者ID:HBPNeurorobotics,项目名称:PyNN,代码行数:10,代码来源:test_assembly.py


示例6: test_restart_loop

def test_restart_loop():
    extra = {"loglevel": 0, "useSystemSim": True, "hardware": sim.hardwareSetup["one-hicann"]}
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
开发者ID:JoelChavas,项目名称:PyNN,代码行数:12,代码来源:test_hardware_brainscales.py


示例7: test_restart_loop

def test_restart_loop():
    if not have_hardware_brainscales:
        raise SkipTest
    extra = {'loglevel':0, 'useSystemSim': True, 'hardware': sim.hardwareSetup['one-hicann']}
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
    sim.setup(**extra)
    sim.run(10.0)
    sim.end()
    
#def test_several_runs():
    if not have_hardware_brainscales:
        raise SkipTest
开发者ID:Huitzilo,项目名称:PyNN,代码行数:18,代码来源:test_hardware_brainscales.py


示例8: test_SpikeSourceArray

 def test_SpikeSourceArray(self):
     from pyNN.utility.plotting import Figure, Panel
     spike_times = [50.]
     p = sim.Population(3, sim.SpikeSourceArray(spike_times=spike_times))
     p2 = sim.Population(3, sim.Hardware_IF_cond_exp())
     syn = sim.StaticSynapse(weight=0.012)
     con = sim.Projection(p, p2, connector = sim.OneToOneConnector(), synapse_type=syn,receptor_type='excitatory')
     spike_times_g = p.get('spike_times')
     p2.record('v')
     sim.run(100.0)
     weights = nan_to_num(con.get('weight', format="array"))
     print weights
     data = p2.get_data().segments[0]
     vm = data.filter(name="v")[0]
     print vm
     Figure(
         Panel(weights,data_labels=["ext->cell"], line_properties=[{'xticks':True, 'yticks':True, 'cmap':'Greys'}]),
         Panel(vm, ylabel="Membrane potential (mV)", data_labels=["excitatory", "excitatory"], line_properties=[{'xticks': True, 'yticks':True}]),
     ).save("result")
开发者ID:costypetrisor,项目名称:PyNN,代码行数:19,代码来源:test_hardware_brainscales.py


示例9: test_run

 def test_run(self):
     sim.setup(**extra)
     self.assertEqual(sim.run(100.0), 100.0)
开发者ID:Huitzilo,项目名称:PyNN,代码行数:3,代码来源:test_simulation_control.py


示例10: test_mean_spike_count

 def test_mean_spike_count(self):
     p = sim.Population(14, sim.EIF_cond_exp_isfa_ista())
     pv = p[2::3]
     pv.record('spikes')
     sim.run(100.0)
     self.assertEqual(p.mean_spike_count(), 2.0)
开发者ID:Huitzilo,项目名称:PyNN,代码行数:6,代码来源:test_populationview.py


示例11: test_reset

 def test_reset(self):
     sim.setup(**extra)
     sim.run(100.0)
     sim.reset()
     self.assertEqual(sim.get_current_time(), 0.0)
开发者ID:Huitzilo,项目名称:PyNN,代码行数:5,代码来源:test_simulation_control.py



注:本文中的pyNN.hardware.brainscales.run函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python mock.get_time_step函数代码示例发布时间:2022-05-25
下一篇:
Python core.is_listlike函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap