Exemplo n.º 1
0
def channel(x):
    return x

def square(x):
    return [x[0]*x[0]]
##

static_params = {'func': mult_3,
                 'in_dim': 3,
                 'out_dim': 3,
                 'train_len': 4.0,
                 'NperD': 84,
                 'length': 100.0,
                 'directory': 'trevor/learning/',
                 'learning': False}
func_name = 'Mult3'

if sharcnet:
    ca.nengo.util.impl.NodeThreadPool.setNumThreads(0)

if testing:
    tests = 2
else:
    tests = 50

for i in range(tests):
    net = plasticity.run_experiment(name='Control'+func_name+'_'+'%dN'%static_params['NperD'],**static_params)
    net.network = None

Exemplo n.º 2
0
                 'rate': 1e-7,
                 'NperD': 84,
                 'length': 100.0,
                 'decay': None,
                 'homeostasis': None,
                 'oja':False,
                 'directory': 'trevor/learning/',
                 'learning': True}
func_name = 'X1X2'

if sharcnet:
    ca.nengo.util.impl.NodeThreadPool.setNumThreads(0)

if view:
    static_params['directory'] = None
    net = plasticity.run_experiment(name='Learn'+func_name,**static_params)
    net.view()
else:
    if param == 'all_tau' or param.startswith('t'):
        lowest_val = 1.0
        step = 10.0
    elif param.startswith('a'): # also captures 'all_a'
        lowest_val = 0.0
        step = 5e-4
    elif param == 'decay':
        lowest_val = 0.0
        step = 5e-9
    elif param == 'homeostasis':
        lowest_val = 5.0e-3
        step = 5.0e-3
    else: