Azzera filtri
Azzera filtri

recognize 5 vowels use neutral network

1 visualizzazione (ultimi 30 giorni)
nguyen tien
nguyen tien il 10 Dic 2015
Commentato: nguyen tien il 15 Dic 2015
hello every body, i have a question, please help me.
I have a program to recognize 5 vowels.
include 20 samples 'a', 20 samples 'e',20 samples 'i', 20 samples 'o' and 20 samples 'u'. each vowel has 48 feature.
I want training 100 samples to recognize 5 vowels with 1 neutron in first layer and 5 neutron in second layer.but i don't know P, T what is it?
this is my code but not run
mau_aa =[a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13 e14 e15 e16 e17 e18 e19 e20 i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 o17 o18 o19 o20 u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20]
MAU_A = mat2cell(mau_aa,1,[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48])
load MAU_A
cnt = size(MAU_A,2)
for n = 1 : cnt
charveca = edu_resize(MAU_A{1,n});
outa(:,n) = charveca;
end
PA = outa(:,1:100)
TA =[ones(5,20) zeros(5,80);zeros(5,20) ones(5,20) zeros(5,60);zeros(5,40) ones(5,20) zeros(5,40);zeros(5,60) ones(5,20) zeros(5,20);zeros(5,80) ones(5,20)];
netA = edu_createn1(PA,TA);
function net = edu_createn1(P,T)
alphabet = P
targets = T
[R,Q] = size(alphabet)
[S2,Q] = size(targets)
S1= 1
net = newff(minmax(alphabet),[S1 S2],{'logsig' 'logsig'},'traingdx');
net.LW{2,1} = net.LW{2,1}*0.01;
net.b{2} = net.b{2}*0.01;
net.performFcn = 'sse';
net.trainParam.goal = 10^-8;
net.trainParam.show = 20;
net.trainParam.epochs = 10000;
net.trainParam.mc = 0.95;
P = alphabet
T = targets
[net,tr] = train(net,P,T)
  3 Commenti
Walter Roberson
Walter Roberson il 11 Dic 2015

What error message are you receiving?

What is size(a1), size(a2) and so on? If they are 1 x 48 then why are you bothering to use mat2cell? Why not just directly define

MAU_A = {a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13 e14 e15 e16 e17 e18 e19 e20 i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 o1 o2 o3 o4 o5 o6 o7 o8 o9 o10 o11 o12 o13 o14 o15 o16 o17 o18 o19 o20 u1 u2 u3 u4 u5 u6 u7 u8 u9 u10 u11 u12 u13 u14 u15 u16 u17 u18 u19 u20};

?

nguyen tien
nguyen tien il 15 Dic 2015
i want 5 neutron in hidden layer, but it have 100 neutron.because i must tranform to circuit, so 100 neutron too large. [R, Q]=>R=48 feature, Q= 100 sample [S2,Q]=>S2=100, Q=100. i think S2 is number of neutron in hidden second layer and i don't like it. but if i want S2= 5 then Q=5.So i only train 5 sample , too less to recognize 5 vowel. a1 is [1x48] , it inculde 48 feature of sample first a similar u20 is [1x48] , it include 48 feature of sampe 20th u. if it is direcly defined then code train will be error.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by