Skip to content

Commit

Permalink
Comparison between arquitectures
Browse files Browse the repository at this point in the history
  • Loading branch information
axelfratoni committed Mar 25, 2018
1 parent 997b6fa commit c0c8b29
Show file tree
Hide file tree
Showing 11 changed files with 13,883 additions and 0 deletions.
25 changes: 25 additions & 0 deletions arch_comparison.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
function out = arch_comparison(arqW, patterns, eta, epochs)
arq_num = numel(arqW);
out = cell(arq_num, 1);
for w = [1:arq_num]
printf('Running achitecture number %d...\n', w);
fflush(stdout);
M = numel(arqW{w});
g = cell(M, 1);
for k = [1:M-1]
g{k} = {@tanh, @dtanh};
endfor
g{M} = {@(x) x, @(x) 1};
out{w} = incremental_learn(arqW{w}, patterns, g, eta, epochs, true, 0.9, [], true);
endfor

best = Inf;
winner = 0;
for k = [1:arq_num]
if (out{k}{2}(epochs) < best)
winner = k;
best = out{k}{2}(epochs);
endif
endfor
printf('The winner is number %d\n', winner);
endfunction
Loading

0 comments on commit c0c8b29

Please sign in to comment.