-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmultiRECO.m
45 lines (32 loc) · 971 Bytes
/
multiRECO.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
clear all;
close all;
exper = 2;
for i = 1:10
seed = i + 1000;
phase = 1;
name = ['r95e' num2str(exper) 'p' num2str(phase) 's' num2str(seed)];
env = netEnvRECO(exper,phase,seed,name);
env.mainLoop;
env.net.log.stimuli = env.log.stimuli;
env.net.log.actions = env.log.actions;
net = env.net;
pause(1);
save(name,'net');
clear net;
clear env;
nameFileToLoad = ['r95e' num2str(exper) 'p' num2str(phase) 's' num2str(seed) '.mat'];
load(nameFileToLoad);
phase = 2;
name = ['r95e' num2str(exper) 'p' num2str(phase) 's' num2str(seed)];
env = netEnvRECO(exper,phase,seed,name);
env.net.dyn.shortTermW = net.dyn.shortTermW;
env.net.dyn.longTermW = net.dyn.longTermW;
env.mainLoop;
env.net.log.stimuli = env.log.stimuli;
env.net.log.actions = env.log.actions;
net = env.net;
pause(1);
save(name,'net');
clear net;
clear env;
end