Skip to content
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

Detect division by zero #3238

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Detect division by zero #3238

wants to merge 1 commit into from

Conversation

dblN
Copy link

@dblN dblN commented Oct 23, 2015

There happens division by zero if the setting is inappropriate.

  • When creating the layer such as convolution or pooling layer, the shape can be 0.
  • When stepsize is not specified, it can be 0.

I added checks for these cases.

@ronghanghu
Copy link
Member

I think we should have this, or at least the stepsize check. Note this is against #2053 (but I prefer this one since #2053 will potentially introduce lots of new troubles).

@bhack
Copy link
Contributor

bhack commented Oct 28, 2015

/cc @mtamburrano

@bhack
Copy link
Contributor

bhack commented Oct 28, 2015

@ronghanghu We could always improve that if somebody had given us any review feedbacks by months. This one got a reply only after 5 days. See also BAIDU researcher catch almost ignored at #2623 and related PR at #2569.

@mtamburrano
Copy link
Contributor

hi @ronghanghu,
I'm not sure how this PR is against #2053, where that PR let the computation to continue even when some batch becomes 0-sized (probably due to the use of FilterLayer).
This PR only checks if the blob has size 0 and stop computation in that case, so it doesn't fix the use case when a blob is completely filtered on purpose

@bhack
Copy link
Contributor

bhack commented Oct 28, 2015

/cc @prclibo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants