-
Notifications
You must be signed in to change notification settings - Fork 115
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
ZeroDivisionError: centered_arange step size is 0 #4
Comments
I ran the code just as the readme shown, while i got this srror: Traceback (most recent call last): Is there anything wrong with my python2.7? or should I use the python3.5? and why? |
@datwelk: are you still encountering this ZeroDivisionError problem? Some of the logic in upsample.py depends on the specific way you have written things in your proto config. It will be easier to debug if you are able to share a specific proto that triggers the error. |
@davidbau it's reproducible using any proto where the spatial dimension of the conv layer output is odd as opposed to even. |
I'm running into the same problem, but not just for odd shaped output layers. Using pytorch, To get interior pytorch modules, I use the following function as such:
|
In
upsample.py
line 352, the step size (3rd param) passed tonp.arange
is 0, yielding aZeroDivisionError
. This is caused byt
having value 1, andreduction
having value 2:1 // 2 = 0
. The fieldmap is((0,0), (4,4), (1,1))
.The conv layer that is being analyzed has a 4x4 kernel, 4 output channels, and a stride of 1. Its input size is 3x120x120, the output size is 4x117x117.
I am going to debug this further but just wanted to share this already.
The text was updated successfully, but these errors were encountered: