Skip to content
Advertisement

Python function returns nan

I have written function for gradient descent and used pandas to read csv file. But when I use data read by pandas, the function returns “nan”. I can’t understand why.

Thanks in advance.

JavaScript

Advertisement

Answer

It might be a vanishing gradient problem. You gradients might be very close or even zero. Try to initialize your weights with non zero values.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement