-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Math OverflowError in update_factors #6
Comments
What is the input data for bpr.py code?? can u provide a sample input |
sampling 9993 <user,item i,item j> triples... Same problem, Any ideas? |
Hi, please try this to fix |
I met the same problem, and I tune the learning rate smaller to resolve the math range error |
Hello,
I'm trying to use you code to learn and predict on a binary sparse matrix (meaning I only have 1s in the matrix), but during the training phase it will crash and throw this error:
Traceback (most recent call last): File "bpr.py", line 260, in <module> model.train(data,sampler,num_iters) File "bpr.py", line 52, in train self.update_factors(u,i,j) File "bpr.py", line 81, in update_factors z = 1.0/(1.0+exp(x)) OverflowError: math range error
I've checked to see who's guilty of this, and apparently the x variable of the fucntion is diverging, therefore causing the
exp
operator to overflow.Have you encountered this issue? Can you suggest a fix?
Thanks
The text was updated successfully, but these errors were encountered: