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

FilterLayer may produce empty empty blob and lead to crash #2623

Open
prclibo opened this issue Jun 19, 2015 · 2 comments
Open

FilterLayer may produce empty empty blob and lead to crash #2623

prclibo opened this issue Jun 19, 2015 · 2 comments
Labels

Comments

@prclibo
Copy link

prclibo commented Jun 19, 2015

Hi,
When a empty selection mask is ported to FilterLayer, it will produces empty tops. I found this empty tops may cause several issues.

  1. As mentioned in skip empty top in backward propagation in filter layer #2569, https://github.com/BVLC/caffe/blob/master/src/caffe/layers/filter_layer.cu#L38 this line will be divided by 0.
  2. Many loss layers (e.g. EuclideanLoss) will produces NaN since they divide the summation loss by N, the input blob size.
  3. GPU operations (e.g. add_kernel for caffe_gpu_add) will fail because they use CAFFE_GET_BLOCKS(N) and when N == 0 this produces 0 blocks, which makes CUDA unhappy.

So maybe there should be some check added to handle empty blob case generated by FilterLayer

@bhack
Copy link
Contributor

bhack commented Jun 19, 2015

This was a known problem. But maintainers ignored our advice to review and merge #2053 with filterlayer.
/cc @mtamburrano

@jshfeng jshfeng added the JD label Jun 23, 2015
@bhack
Copy link
Contributor

bhack commented Oct 20, 2015

@BVLC ping

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

No branches or pull requests

3 participants