/usr/lib/scilab-ann/demos/encoder_cc.sci is in scilab-ann 0.4.2.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | // Tight 4-2-4 encoder using a mixed standard/conjugate gradients algorithm
rand('seed',0);
x = [1,0,0,0;
0,1,0,0;
0,0,1,0;
0,0,0,1]';
t = x;
N = [4,2,4];
W = ann_FF_init(N, [-1,1], [-1,1]);
// --- standard BP algorithm ---
// learning parameter for standard BP part
lp = [2.5,0];
printf("Standard BP ...");
// standard BP for first 20 steps
T = 20;
W = ann_FF_Std_online(x,t,N,W,lp,T);
// --- Conjugate Gradients algorithm ---
printf("Conjugate Gradients ...");
T = 20;
dW = 0.00001;
W = ann_FF_ConjugGrad(x, t, N, W, T, dW);
// --- test ---
// full run
ann_FF_run(x,N,W)
// encoder
encoder = ann_FF_run(x,N,W,[2,2])
// decoder
decoder = ann_FF_run(encoder,N,W,[3,3])
|