Package topo :: Package learningfn
[hide private]
[frames] | no frames]

Source Code for Package topo.learningfn

 1  """ 
 2  A family of function objects for changing a set of weights over time. 
 3   
 4  Learning functions come in two varieties: LearningFunction, and 
 5  CFPLearningFunction.  A LearningFunction (e.g. Hebbian) applies to one 
 6  set of weights, typically from one ConnectionField.  To apply learning 
 7  to an entire CFProjection, a LearningFunction can be plugged in to 
 8  CFPLF_Plugin.  CFPLF_Plugin is one example of a CFPLearningFunction, 
 9  which is a function that works with the entire Projection at once. 
10  Some optimizations and algorithms can only be applied at the full 
11  CFPLearningFn level, so there are other CFPLearningFns beyond 
12  CFPLF_Plugin. 
13   
14  Any new learning functions added to this directory will automatically 
15  become available for any model. 
16   
17  $Id: __init__.py 8936 2008-08-21 13:23:31Z ceball $ 
18  """ 
19  __version__='$Revision: 8936 $' 
20   
21  # Automatically discover all .py files in this directory, and import classes from basic.py.  
22  import os,fnmatch 
23  from basic import * 
24  __all__ = basic.__all__ + [f.split('.py')[0] for f in os.listdir(__path__[0]) if fnmatch.fnmatch(f,'[!._]*.py')] 
25  del f,os,fnmatch 
26