lam_id = 'lamina' (n_dict_lam, s_dict_lam) = LPU.lpu_parser('./data/lamina.gexf.gz') man.add(LPU, lam_id, dt, n_dict_lam, s_dict_lam, input_file='./data/vision_input.h5', output_file='lamina_output.h5', device=args.lam_dev, time_sync=args.time_sync) med_id = 'medulla' (n_dict_med, s_dict_med) = LPU.lpu_parser('./data/medulla.gexf.gz') man.add(LPU, med_id, dt, n_dict_med, s_dict_med, output_file='medulla_output.h5', device=args.med_dev, time_sync=args.time_sync) pat = vc.create_pattern(n_dict_lam, n_dict_med) man.connect(lam_id, med_id, pat, 0, 1, compat_check=False) man.spawn() man.start(steps=args.steps) man.wait()
LPU, lam_id, dt, n_dict_lam, s_dict_lam, input_file="./data/vision_input.h5", output_file="lamina_output.h5", device=args.lam_dev, time_sync=args.time_sync, ) med_id = "medulla" (n_dict_med, s_dict_med) = LPU.lpu_parser("./data/medulla.gexf.gz") man.add( LPU, med_id, dt, n_dict_med, s_dict_med, output_file="medulla_output.h5", device=args.med_dev, time_sync=args.time_sync, ) pat = vc.create_pattern(n_dict_lam, n_dict_med) man.connect(lam_id, med_id, pat, 0, 1, compat_check=False) man.spawn() man.start(steps=args.steps) man.wait()
output_file='medulla_output.h5', port_ctrl=port_ctrl, port_data=port_data, port_time=port_time, device=args.al_dev, id='medulla', time_sync=args.time_sync) man.add_mod(lpu_med) tic = ptime(tic, 'Load MED LPU time') (n_dict_int, s_dict_int) = LPU.lpu_parser('./data/integrate.gexf.gz') lpu_int = LPU(dt, n_dict_int, s_dict_int, output_file='integrate_output.h5', port_ctrl=port_ctrl, port_data=port_data, port_time=port_time, device=args.al_dev, id='integrate', time_sync=args.time_sync) man.add_mod(lpu_int) tic = ptime(tic, 'Load INT LPU time') # connect lam to med pat_lam_med = vc.create_pattern(lpu_lam, lpu_med) man.connect(lpu_lam, lpu_med, pat_lam_med, 0, 1) tic = ptime(tic, 'Connect LAM and MED time') intf_al = lpu_al.interface intf_lam = lpu_lam.interface intf_med = lpu_med.interface intf_int = lpu_int.interface # Initialize connectivity patterns among LPU's pat_al_int = pattern.Pattern(','.join(intf_al.to_selectors()), ','.join(intf_int.to_selectors())) pat_med_int = pattern.Pattern(','.join(intf_med.to_selectors()), ','.join(intf_int.to_selectors()))
port_ctrl = args.port_ctrl if args.port_time is None: port_time = get_random_port() else: port_time = args.port_time man = core.Manager(port_data, port_ctrl, port_time) man.add_brok() (n_dict_lam, s_dict_lam) = LPU.lpu_parser('./data/lamina.gexf.gz') lpu_lam = LPU(dt, n_dict_lam, s_dict_lam, input_file='./data/vision_input.h5', output_file='lamina_output.h5', port_ctrl=port_ctrl, port_data=port_data, port_time=port_time, device=args.lam_dev, id='lamina', time_sync=args.time_sync) man.add_mod(lpu_lam) (n_dict_med, s_dict_med) = LPU.lpu_parser('./data/medulla.gexf.gz') lpu_med = LPU(dt, n_dict_med, s_dict_med, output_file='medulla_output.h5', port_ctrl=port_ctrl, port_data=port_data, port_time=port_time, device=args.med_dev, id='medulla', time_sync=args.time_sync) man.add_mod(lpu_med) pat = vc.create_pattern(lpu_lam, lpu_med) man.connect(lpu_lam, lpu_med, pat, 0, 1) man.start(steps=args.steps) man.stop()
s_dict_lam, input_file='./data/vision_input.h5', output_file='lamina_output.h5', port_ctrl=port_ctrl, port_data=port_data, port_time=port_time, device=args.lam_dev, id='lamina', time_sync=args.time_sync) man.add_mod(lpu_lam) (n_dict_med, s_dict_med) = LPU.lpu_parser('./data/medulla.gexf.gz') lpu_med = LPU(dt, n_dict_med, s_dict_med, output_file='medulla_output.h5', port_ctrl=port_ctrl, port_data=port_data, port_time=port_time, device=args.med_dev, id='medulla', time_sync=args.time_sync) man.add_mod(lpu_med) pat = vc.create_pattern(lpu_lam, lpu_med) man.connect(lpu_lam, lpu_med, pat, 0, 1) man.start(steps=args.steps) man.stop()