From 12a7eb16c088a7c9a4ed974afabac583a1150b7a Mon Sep 17 00:00:00 2001 From: Raghav Gupta <61000784+Raghav-Gupta24@users.noreply.github.com> Date: Sat, 3 Jul 2021 01:03:50 +0530 Subject: [PATCH] The parameters for ones( ) in a2 is incorrect ones(size(z2), 1) is incorrect and it returns an error. Kindly pull this request to make the changes. --- mlclass-ex3/mlclass-ex3/predict.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlclass-ex3/mlclass-ex3/predict.m b/mlclass-ex3/mlclass-ex3/predict.m index 3176635..aa05253 100644 --- a/mlclass-ex3/mlclass-ex3/predict.m +++ b/mlclass-ex3/mlclass-ex3/predict.m @@ -24,7 +24,7 @@ a1 = [ones(m,1) X]; z2 = a1 *Theta1'; -a2 = [ones(size(z2),1) sigmoid(z2)]; +a2 = [ones(m,1) sigmoid(z2)]; z3 = a2*Theta2'; a3 = sigmoid(z3);