new 2
2010 07 15 22:24
BP
matlab
matlab
matlab
BP
sistor2004
BP
matlab
wangleisxcc
C++
Matlab
Fortran
BP
BP
matlab
BP
sistor2004
%
BP
matlab
,
BP
%yyy
o(k)
(<0.0001)
%v(i,j)=v(i,j)+deltv(i,j)+a*dv(i,j);
clear all
clc
inputNums=3; %
outputNums=3; %
hideNums=10; %
maxcount=20000; %
samplenum=3; %
precision=0.001; %
yyy=1.3; %yyy
alpha=0.01; %
a=0.5; %BP
9
error=zeros(1,maxcount+1); %error
errorp=zeros(1,samplenum); %
v=rand(inputNums,hideNums); %3*10;v
3*10
;
v
deltv=zeros(inputNums,hideNums); %3*10;
dv=zeros(inputNums,hideNums); %3*10;
w=rand(hideNums,outputNums); %10*3;
V
deltw=zeros(hideNums,outputNums);%10*3
dw=zeros(hideNums,outputNums); %10*3
samplelist=[0.1323,0.323,-0.132;0.321,0.2434,0.456;-0.6546,-0.3242,0.3255];
%3*3;
3*3(
3
)
expectlist=[0.5435,0.422,-0.642;0.1,0.562,0.5675;-0.6464,-0.756,0.11];
%3*3;
3*3(
3
)
count=1;
while (count<=maxcount) %
1
20000
c=1;
while (c<=samplenum)
for k=1:outputNums
d(k)=expectlist(c,k); %
,d(1:3)
end
for i=1:inputNums
x(i)=samplelist(c,i); %
,x(1:3)
4
end
%Forward();
for j=1:hideNums
net=0.0;
for i=1:inputNums
net=net+x(i)*v(i,j);%
∑X(i)V(i)
end
-1-