Skip to content

Commit b63676b

Browse files
committed
tweak mlpRegPred.m
1 parent 2fb3339 commit b63676b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

chapter05/mlpRegPred.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
W = model.W;
1010
b = model.b;
1111
T = length(W);
12-
Z = cell(T+1,1);
13-
Z{1} = X;
12+
Y = X;
1413
for t = 1:T-1
15-
Z{t+1} = tanh(W{t}'*Z{t}+b{t});
14+
Y = tanh(W{t}'*Y+b{t});
1615
end
17-
Y = W{T}'*Z{T}+b{T};
16+
Y = W{T}'*Y+b{T};

0 commit comments

Comments
 (0)