ZeroDivisionError: float division by zero
See original GitHub issueget error when run example below in windows 10. The model is default: FiBiNET.
python .\examples\run_classification_criteo.py
Traceback (most recent call last):
File ".\examples\run_classification_criteo.py", line 54, in <module>
l2_reg_embedding=1e-5, device=device)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\deepctr_torch\models\fibinet.py", line 53, in __init__
self.SE = SENETLayer(self.filed_size, reduction_ratio, seed, device)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\deepctr_torch\layers\interaction.py", line 81, in __init__
nn.Linear(self.filed_size, self.reduction_size, bias=False),
File "C:\Users\civil\AppData\Roaming\Python\Python37\site-packages\torch\nn\modules\linear.py", line 77, in __init__
self.reset_parameters()
File "C:\Users\civil\AppData\Roaming\Python\Python37\site-packages\torch\nn\modules\linear.py", line 80, in reset_parameters
init.kaiming_uniform_(self.weight, a=math.sqrt(5))
File "C:\Users\civil\AppData\Roaming\Python\Python37\site-packages\torch\nn\init.py", line 316, in kaiming_uniform_
std = gain / math.sqrt(fan)
ZeroDivisionError: float division by zero
But i just tried deepFM, it seems no float division by zero issue.
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
ZeroDivisionError: float division by zero in Python | bobbyhadz
The Python "ZeroDivisionError: float division by zero" occurs when we try to divide a floating-point number by 0 . To solve the error,...
Read more >Get ZeroDivisionError: float division in python - Stack Overflow
You are dividing two integers, so python is using integer division. In integer division, the quotient is rounded down. For example, 364/365 ...
Read more >ZeroDivisionError: division by zero - Net-Informations.Com
ZeroDivisionError is a built-in Python exception thrown when a number is divided by 0. This means that the exception raised when the second...
Read more >ZeroDivisionError: division by zero - Yawin Tutor
ZeroDivisionError occurs when a number is divided by a zero. In Mathematics, when a number is divided by a zero, the result is...
Read more >Python error ZeroDivisionError float division by zero - Edureka
In the above line the denominator becomes zero. A float number cannot be devided by zero. In this case the express is divided...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@chenkkkk FYI, I have the same bug and no idea what you did to resolve it…
In my case, I found that I actually had division by zero at a closer look.