I implemented gradientDescent function, but getting this error:
Wrong output for the loss function. Check how you are implementing the matrix multiplications.
Expected: 0.6709497038162118.
Got: 6.783954452541828.
Wrong output for the loss function. Check how you are implementing the matrix multiplications.
Expected: 6.5044107216556135.
Got: 162.83776189572313.
This is my sigmoid implementation:
if np.isscalar(z):
h = 1 / (1 + np.exp(-z))
else:
h = np.exp(-z)
for i in range(len(h)):
h[i] = 1 / (1 + h[i])