Why am I getting error while implementing logistic regression?

In the following code:

for i in range(100):
l,w,b = grad_descent(x,y_true,w,b,learning_rate=0.1)
loss.append(l)
acc.append(get_acc(x,y_true,w,b))

I am getting the following error:

C:\Users\Hemant Kumar\Anaconda3\lib\site-packages\ipykernel_launcher.py:6: RuntimeWarning: divide by zero encountered in log2

C:\Users\Hemant Kumar\Anaconda3\lib\site-packages\ipykernel_launcher.py:6: RuntimeWarning: invalid value encountered in multiply

Please tell me what can be wrong in my code?

There is somewhere error in the upper functions, as the value of denominator goes to zero. Check the code of functions again line by line from the videos. If error still persists, than share link of your ipynb file after saving it on google drive.

Happy Learning :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.