From 863f1d71578cbf0b070d0c80cae34ebd30f446cd Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 1 Nov 2014 21:18:32 +0100 Subject: [PATCH] Compute the sigmoid gradient --- ex4/sigmoidGradient.m | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/ex4/sigmoidGradient.m b/ex4/sigmoidGradient.m index 37ec0db..9baaf2c 100644 --- a/ex4/sigmoidGradient.m +++ b/ex4/sigmoidGradient.m @@ -12,22 +12,8 @@ g = zeros(size(z)); % Instructions: Compute the gradient of the sigmoid function evaluated at % each value of z (z can be a matrix, vector or scalar). - - - - - - - - - - - - +g = sigmoid(z).*(1 - sigmoid(z)); % ============================================================= - - - end