I’m facing error with the built in function sigmoid_backward function and the error appears is
~/work/release/W4A1/dnn_utils.py in sigmoid_backward(dA, cache)
74 Z = cache
75
—> 76 s = 1/(1+np.exp(-Z))
77 dZ = dA * s * (1-s)
78
This function has been working for a long time without any issue. I suggest you check how the parameter ‘cache’ is constructed before passing to the sigmoid_backward() function.