We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 92c8220 commit dd161e4Copy full SHA for dd161e4
1 file changed
chapter05/mlpPred.m
@@ -1,4 +1,4 @@
1
-function y = mlpPred(model, X)
+function Y = mlpPred(model, X)
2
% Multilayer perceptron prediction
3
% Input:
4
% model: model structure
@@ -8,9 +8,7 @@
8
% Written by Mo Chen (sth4nth@gmail.com).
9
W = model.W;
10
L = length(W)+1;
11
-Z = cell(L);
12
-Z{1} = X;
+Y = X;
13
for l = 2:L
14
- Z{l} = sigmoid(W{l-1}'*Z{l-1});
15
-end
16
-y = Z{L};
+ Y = sigmoid(W{l-1}'*Y);
+end
0 commit comments