Programmation des reseaux de neurones sous ma
maxim dreyfus
Messages postés
18
Statut
Membre
-
atlantic word Messages postés 3 Statut Membre -
atlantic word Messages postés 3 Statut Membre -
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}
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}
A voir également:
- Programmation des reseaux de neurones sous ma
- Application de programmation - Guide
- Mot de passe reseau - Guide
- Sandra a décidé de mieux contrôler son image et sa présence sur différents réseaux sociaux. qu’est-il possible de faire sur ces réseaux ? - Forum Études / Formation High-Tech
- Messenger en attente de réseau ✓ - Forum Facebook
- Messenger en attente de reseau - Forum Facebook Messenger
4 réponses
SVP
je veux savoir la reponse le plus tot possible il me reste qu'une semaine pour soutenir
merci beaucoup
je veux savoir la reponse le plus tot possible il me reste qu'une semaine pour soutenir
merci beaucoup
j'utilise le matlabe .et quand j'execute mon programme il m'ecrit (???inputs are incorrectly sized .matrix must have 19 rows)
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}
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}