CSAILVision / CSAILVision/NetDissect

ZeroDivisionError: centered_arange step size is 0

Open
#4 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
455
Forks
114
PR merge metrics
No merged PRs in 30d

Description

In `upsample.py` line 352, the step size (3rd param) passed to `np.arange` is 0, yielding a `ZeroDivisionError`. This is caused by `t` having value 1, and `reduction` 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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in upsample.py at line 352 and trace centered_arange with the reported fieldmap, kernel, stride, and input/output sizes. Reproduce the t=1 and reduction=2 case, then determine the expected behavior when the computed np.arange step is zero. Done means the case no longer raises ZeroDivisionError and the relevant behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.