Skip to content
Advertisement

List index out of range for Python

I have a question regarding the following exercise: In this function, I print lastrecord.fetchall()[0][0] and quantity.get to make sure they are float. So the program prints in that case: 5.0 for lastrecord.fetchall and quantity.get Up to now, no problem, but when I try to us them up, it gives me an error of List Index Out Of Range, so program

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. 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.

Advertisement