Programmation des reseaux de neurones sous ma

Bonjour,

j'arrive pas a faire marcher mon programme ,il ne veux pas se compiler

net=network;
net.numinputs=3;
net.numlayers=2;
net.biasconnect(1)=1;
net.biasconnect(2)=1;
net.outputconnect(2)=1;
net.inputConnect (1,1) = 1;
net.inputConnect (1,2) = 1;
net.inputConnect (1,3) = 1;
net.targetconnect(2)=1;
net.inputs{1}.range = [001 111; 001 111; 001 111;001 111; 001 111; 001 111;001 111; 001 111; 001 111];
net.inputs{2}.range = [001 111; 001 111; 001 111;001 111; 001 111; 001 111;001 111; 001 111; 001 111];
net.inputs{1}.range = [000 111; 000 111; 000 111;000 111; 000 111; 000 111;000 111; 000 111; 000 111];
net.layers{1}.size = 15;
net.layers{2}.size = 8;
net.layers{1}.transferFcn = 'tansig';
net.layers{2}.transferFcn = 'tansig';
net.initFcn = 'initlay';
net.performFcn = 'mse';
net.trainFcn = 'traingdx';
net = init(net);
P{1}={[011;100;100;100;100;100;100;100;100];[100;011;011;011;011;011;011;011;011];[110;011;011;011;011;011;011;011;011]};
T{1}={1 ;0 ;0 ;0 ;0 ;0 ;0 ;0 ;0};
P{2}={[011;100;100;100;100;100;100;100;100];[100;011;011;011;011;011;011;011;011];[111;010;010;010;010;010;010;010;010]};
T{2}={0 ;1 ;0 ;0 ;0 ;0 ;0 ;0; 0};
P{3}={[010;101;101;101;101;101;101;101;101];[101;010;010;010;010;010;010;010;010];[110;011;011;011;011;011;011;011;011]};
T{3}={0 ;0 ;1 ;0 ;0 ;0 ;0 ;0; 0};
P{4}={[010;101;101;101;101;101;101;101;101];[101;010;010;010;010;010;010;010;010];[111;010;010;010;010;010;010;010;010]};
T{4}={0 ;0 ;0 ;1 ;0 ;0 ;0 ;0; 0};
P{5}={[010;101;101;101;101;101;101;101;101];[011;100;100;100;100;100;100;100;100];[000;000;000;000;000;000;000;000;000]};
T{5}={0 ;0 ;0 ;0 ;1 ;0 ;0 ;0; 0};
P{6}={[101;010;010;010;010;010;010;010;010];[100;011;011;011;011;011;011;011;011];[000;000;000;000;000;000;000;000;000]};
T{6}={0 ;0 ;0 ;0 ;0 ;1 ;0 ;0; 0};
P{7}={[010;101;101;101;101;101;101;101;101];[100;011;011;011;011;011;011;011;011]; [000;000;000;000;000;000;000;000;000]};
T{7}={0 ;0 ;0 ;0 ;0 ;0 ;1 ;0; 0};
P{8}={[011;100;100;100;100;100;100;100;100];[101;010;010;010;010;010;010;010;010];[000;000;000;000;000;000;000;000;000]};
T{8}={0 ;0 ;0 ;0 ;0 ;0 ;0 ;1; 0};
for i = 1:8
P{i} = cell2mat(P{i});
T{i} = cell2mat(T{i});

net.trainParam.epochs = 100;
net.trainParam.goal = 1e-4;
net = train(net,P{i},T{i});

end
net.IW{1,1}
net.IW{1,2}
net.IW{1,3}
net.IW{2,1}
net.IW{2,2}
net.IW{2,3}
Configuration: Windows Vista Internet Explorer 7.0

4 réponses

  1. SVP
    je veux savoir la reponse le plus tot possible il me reste qu'une semaine pour soutenir
    merci beaucoup
    2
    1. KONICHIWA,

      Tu utilises quel langage pour programmer ton RNA ???
      1
      1. bonjour
        j'utilise le matlab et quand j'execute le programme il parait le message suivant
        inputs are incorectly sized .MATRIX must have 19 rows
        merci
        0
    2. j'utilise le matlabe .et quand j'execute mon programme il m'ecrit (???inputs are incorrectly sized .matrix must have 19 rows)
      0
      1. j'arrive pas a faire marcher mon programme ,il ne veux pas se compiler

        net=network;
        net.numinputs=3;
        net.numlayers=2;
        net.biasconnect(1)=1;
        net.biasconnect(2)=1;
        net.outputconnect(2)=1;
        net.inputConnect (1,1) = 1;
        net.inputConnect (1,2) = 1;
        net.inputConnect (1,3) = 1;
        net.targetconnect(2)=1;
        net.inputs{1}.range = [001 111; 001 111; 001 111;001 111; 001 111; 001 111;001 111; 001 111; 001 111];
        net.inputs{2}.range = [001 111; 001 111; 001 111;001 111; 001 111; 001 111;001 111; 001 111; 001 111];
        net.inputs{1}.range = [000 111; 000 111; 000 111;000 111; 000 111; 000 111;000 111; 000 111; 000 111];
        net.layers{1}.size = 15;
        net.layers{2}.size = 8;
        net.layers{1}.transferFcn = 'tansig';
        net.layers{2}.transferFcn = 'tansig';
        net.initFcn = 'initlay';
        net.performFcn = 'mse';
        net.trainFcn = 'traingdx';
        net = init(net);
        P{1}={[011;100;100;100;100;100;100;100;100];[100;011;011;011­;011;011;011;011;011];[110;011;011;011;011;011;011;011;011]}­;
        T{1}={1 ;0 ;0 ;0 ;0 ;0 ;0 ;0 ;0};
        P{2}={[011;100;100;100;100;100;100;100;100];[100;011;011;011­;011;011;011;011;011];[111;010;010;010;010;010;010;010;010]}­;
        T{2}={0 ;1 ;0 ;0 ;0 ;0 ;0 ;0; 0};
        P{3}={[010;101;101;101;101;101;101;101;101];[101;010;010;010­;010;010;010;010;010];[110;011;011;011;011;011;011;011;011]}­;
        T{3}={0 ;0 ;1 ;0 ;0 ;0 ;0 ;0; 0};
        P{4}={[010;101;101;101;101;101;101;101;101];[101;010;010;010­;010;010;010;010;010];[111;010;010;010;010;010;010;010;010]}­;
        T{4}={0 ;0 ;0 ;1 ;0 ;0 ;0 ;0; 0};
        P{5}={[010;101;101;101;101;101;101;101;101];[011;100;100;100­;100;100;100;100;100];[000;000;000;000;000;000;000;000;000]}­;
        T{5}={0 ;0 ;0 ;0 ;1 ;0 ;0 ;0; 0};
        P{6}={[101;010;010;010;010;010;010;010;010];[100;011;011;011­;011;011;011;011;011];[000;000;000;000;000;000;000;000;000]}­;
        T{6}={0 ;0 ;0 ;0 ;0 ;1 ;0 ;0; 0};
        P{7}={[010;101;101;101;101;101;101;101;101];[100;011;011;011­;011;011;011;011;011]; [000;000;000;000;000;000;000;000;000]};
        T{7}={0 ;0 ;0 ;0 ;0 ;0 ;1 ;0; 0};
        P{8}={[011;100;100;100;100;100;100;100;100];[101;010;010;010­;010;010;010;010;010];[000;000;000;000;000;000;000;000;000]}­;
        T{8}={0 ;0 ;0 ;0 ;0 ;0 ;0 ;1; 0};
        for i = 1:8
        P{i} = cell2mat(P{i});
        T{i} = cell2mat(T{i});

        net.trainParam.epochs = 100;
        net.trainParam.goal = 1e-4;
        net = train(net,P{i},T{i});

        end
        net.IW{1,1}
        net.IW{1,2}
        net.IW{1,3}
        net.IW{2,1}
        net.IW{2,2}
        net.IW{2,3}
        0