Coursera icon indicating copy to clipboard operation
Coursera copied to clipboard

nnCostFunction.m in ex4

Open MaverickMeerkat opened this issue 5 years ago • 0 comments

I think that:

	z2t = [1; Theta1 * a1t];
       d2t = Theta2' * d3t .* sigmoidGradient(z2t);

should be:

    z2t = Theta1 * a1t;
    d2t = Theta2' * d3t .* [1; sigmoidGradient(z2t)];

You do not add 1 to compute z2.

MaverickMeerkat avatar Aug 22 '19 16:08 MaverickMeerkat