当前位置: 首页>>代码示例>>Python>>正文


Python Context.add_step方法代码示例

本文整理汇总了Python中context.Context.add_step方法的典型用法代码示例。如果您正苦于以下问题:Python Context.add_step方法的具体用法?Python Context.add_step怎么用?Python Context.add_step使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在context.Context的用法示例。


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

示例1: Context

# 需要导入模块: from context import Context [as 别名]
# 或者: from context.Context import add_step [as 别名]




s = Context()

# how to have input layer?...Need input layer? lolz

ps = PretendStimulus(....)

s.add_node('photoreceptor', is_worker=True, ..., focus=True)




# how to assign inputs appropriately? 
# just...add a function to each node that allows it to get the next relevant
# stimulus point...could pass own position to stimulus, then stimulus returns 
# relevant value?'
# and do positioning as before, with just a function that each unit can ask
# for a position from.
# should have a way to reset distribution functions when simulation is reset?

# something like
s.add_step('update', store(access_input, ps)) # have s.store? will passing ps like this work?
# or something
# and access_input basically gets a node to pass its position to ps and then update its output in the right way
# alternately, why not just subclass Node to make something custom-made for accessing input?
# can make a few subclasses and then get rid of some of the options in init for node
开发者ID:abjose,项目名称:surfsim3,代码行数:31,代码来源:test.py


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