-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestingAttention.m
62 lines (48 loc) · 1.93 KB
/
testingAttention.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ANALYTIC_GAUSSIAN = 0;
FADING_GAUSSIAN = 1;
inputType = 0;
minInterval = 0.1; %seconds
maxInterval = 120; %seconds
numIntervals = 60;
%network architecture
inputWidth = 41; %how wide is input vector?
nHidNodes = 10;
outputWidth = 10; %how wide is output vector
fixedLocation = true;
attentionMultiplier = 1.2;
modality{1} = setPercepts(0,minInterval,maxInterval,numIntervals, ...
inputWidth, outputWidth,fixedLocation, ...
5, 45, 2, ...
0.0045, 0.0105, 0.001, ...
false, true, false);
modality{1} = populateInputsOutputs(modality{1});
%for the moment the second modality is very similar to first
modality{2} = setPercepts(1,minInterval,maxInterval,numIntervals, ...
inputWidth, outputWidth,fixedLocation, ...
5, 45, 2, ...
0.0045, 0.0105 , 0.001 , ...
false, true, false);
modality{2} = populateInputsOutputs(modality{2});
fig = figure(1);
for t = 1:modality{1}.numIntervals
pause(0.4);
set(fig, 'Name', ['Phase' num2str(1) ' - Input Time t= ' num2str(t)]);
%The guassian distributions input on this phase
subplot(2,1,1);
axis([0 modality{1}.inputWidth + 1 0 1.1]);
bar(1:modality{1}.inputWidth, modality{1}.MemoryCurves(t,:));
xlim([0 modality{1}.inputWidth + 1]);
ylim([0 2.2]);
xlabel('Input Columns');
ylabel('Activation');
title(['Input modality {1}' ]);
%The guassian distribution that is input.
subplot(2,1,2);
axis([0 modality{2}.inputWidth + 1 0 1.1]);
bar(1:modality{2}.inputWidth, modality{2}.MemoryCurves(t,:) );
xlim([0 modality{2}.inputWidth + 1]);
ylim([0 2.2]);
xlabel('Input Columns');
ylabel('Activation');
title(['Input modality {2}' ]);
end