Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 人工智能 > 深度神经网络/深度学习
深度神经网络/深度学习 A discussion board for Deep Neural Network|Deep Learning.
 
 
主题工具 显示模式
旧 2009-06-02, 08:44   #1
hnerwjs
初级会员
 
注册日期: 2009-05-04
年龄: 40
帖子: 2
声望力: 0
hnerwjs 正向着好的方向发展
微笑 [求助]帮忙看下这段代码啥意思

请高手解释下一下代码,谢谢哦!!!!

timeout1=logintimeout(10);
conn1=database('shenjingwangluo','','');

cursor=exec(conn1,'select pingjun from yangbenji2');
cursor=fetch(cursor);
pingjun=cursor.data;
pingjun=[pingjun{:}];


cursor2=exec(conn1,'select junfanggen from yangbenji2');
cursor2=fetch(cursor2);
junfanggen1=cursor2.data;
junfanggen=[junfanggen1{:}];

cursor3=exec(conn1,'select qiaodu from yangbenji2');
cursor3=fetch(cursor3);
qiaodu1=cursor3.data;
qiaodu=[qiaodu1{:}];

cursor4=exec(conn1,'select xielv from yangbenji2');
cursor4=fetch(cursor4);
xielv1=cursor4.data;
xielv=[xielv1{:}];

cursor5=exec(conn1,'select xielou from yangbenji2');
cursor5=fetch(cursor5);
xielou1=cursor5.data;
xielou=[xielou1{:}];

p=[min(pingjun) max(pingjun);min(junfanggen) max(junfanggen);min(qiaodu) max(qiaodu);min(xielv) max(xielv)];
[w1,b1,w2,b2]=initff(p,7,'tansig',1,'tansig')



% [w1,b1]=rands(7,4);
% [w2,b2]=rands(1,7);
% [b1]=rands(3,1);
% [b2]=rands(1,1);

p1=[pingjun;junfanggen;qiaodu;xielv];
t1=[xielou];

% tp=[1,500,0.02,0.0001,0.001,10,0.1,1e10];
[w1,b1,w2,b2,te,tr]=trainlm(w1,b1,'tansig',w2,b2,'tansig',p1,t1,[1,500,0.02,0.0001,0.001,10,0.1,1e10]);




%
% tp=[1,110,0.02,0.01];
% [w1,b1,w2,b2,te,tr]=trainbp(w1,b1,'tansig',w2,b2,'tansig',p1,t1,tp);


%%%%%%%%插入数据库%%%%%%%%%%%%%
% exec(conn1,'delete from w1');
% exec(conn1,'delete from w2');
% exec(conn1,'delete from b1');
% exec(conn1,'delete from b2');
% for i1=w1'
% colnames={'c1','c2','c3','c4','c5','c6','c7'};
% insert(conn1,'w1',colnames,i1');
% end
% for i=w2'
% colnames={'c1','c2','c3','c4','c5','c6','c7','c8','c9','c10','c11','c12','c13','c14','c15'};
% insert(conn1,'w2',colnames,i');
% end
% for i=b1'
% colnames={'c1'};
% insert(conn1,'b1',colnames,i');
% end
% for i=b2'
% colnames={'c1'};
% insert(conn1,'b2',colnames,i');
% end


%%%%%%%%插入数据库%%%%%%%%%%%%%



cursor1c=exec(conn1,'select pingjun from yangbenjiceshi1');
cursor1c=fetch(cursor1c);
pingjun1c=cursor1c.data;
pingjunc=[pingjun1c{:}];


cursor2c=exec(conn1,'select junfanggen from yangbenjiceshi1');
cursor2c=fetch(cursor2c);
junfanggen1c=cursor2c.data;
junfanggenc=[junfanggen1c{:}];

cursor3c=exec(conn1,'select qiaodu from yangbenjiceshi1');
cursor3c=fetch(cursor3c);
qiaodu1c=cursor3c.data;
qiaoduc=[qiaodu1c{:}];

cursor4c=exec(conn1,'select xielv from yangbenjiceshi1');
cursor4c=fetch(cursor4c);
xielv1c=cursor4c.data;
xielvc=[xielv1c{:}];

cursor5c=exec(conn1,'select xielou from yangbenjiceshi1');
cursor5c=fetch(cursor5c);
xielou1c=cursor5c.data;
xielouc=[xielou1c{:}];

p1c=[pingjunc;junfanggenc;qiaoduc;xielvc];
t1c=[xielouc]
a=simuff(p1c,w1,b1,'tansig',w2,b2,'tansig')
hnerwjs 当前离线   回复时引用此帖
 

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为北京时间。现在的时间是 20:52


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.