1
$\begingroup$

I have written a RNN algorithm in Python/IDLE and ran it. It works and is successful. My dataset is large so I wanted to run it using Kaggle's computers, rather than my laptop. However, when I copied and pasted the code, the Kaggle console reported that there had been a division by 0. I'm guessing that IDLE has a built in method of handling division by 0's whereas Kaggle doesn't, hence why it was never reported in the IDLE console, and had been reported in the Kaggle console. How can I overcome this?

$\endgroup$
  • $\begingroup$ My first advice would be to debug and check that it's exactly the same process which is run. Check in particular that the data is correctly loaded: if a file is not found and silently ignored it could cause an empty dataset, hence a dvide by zero somewhere. $\endgroup$ – Erwan Aug 7 '19 at 16:29
  • 1
    $\begingroup$ Also make sure you're running the same version of Python and your libraries. If, for example you're using python2 in kaggle it's possible that the integer division caused something small to go to 0. Then if you divide by this you could get the error. Try adding from __future__ import division to see if it fixes it. Same thing may be caused by older versions of your libraries. $\endgroup$ – Djib2011 Aug 8 '19 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.