码迷,mamicode.com
首页 > 其他好文 > 详细

Sigmoid function in NN

时间:2015-10-01 00:35:29      阅读:220      评论:0      收藏:0      [点我收藏+]

标签:

 

X = [ones(m, 1) X];
temp = X * Theta1;

t = size(temp, 1);
temp = [ones(t, 1) temp];

h = temp * Theta2;
[max_num, p] = max(h, [], 2);

Without Sigmoid function, Training Set Accuracy: 69.620000

 

 1 X = [ones(m, 1) X];
 2 temp = X * Theta1;
 3 temp = sigmoid(temp);
 4 
 5 t = size(temp, 1);
 6 temp = [ones(t, 1) temp];
 7 
 8 h = temp * Theta2;
 9 h = sigmoid(h);
10 [max_num, p] = max(h, [], 2);

With Sigmoid function, the Training Set Accuracy: 97.520000

 

Sigmoid function in NN

标签:

原文地址:http://www.cnblogs.com/devai/p/4850548.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!