Skip to content

Conversation

@erictzeng
Copy link
Contributor

Fixes #1864.

When the local_size of a LRNLayer in ACROSS_CHANNELS mode is larger than the number of channels in a blob, we get some nasty indexing errors in the GPU implementation (the CPU implementation is fine). This pull request consists of two contributions:

  1. Two new test cases, TestForwardAcrossChannelsLargeRegion and TestGradientAcrossChannelsLargeRegion that use a local_size of 15 on a blob with 7 channels. These tests break the current master implementation.
  2. Bound checks in the GPU implementation to ensure that we are no longer indexing out of bounds. This fixes the additional test cases introduced in point 1.

As far as I can tell, this PR is complete, though if anyone finds anything wrong with it of course I'd be happy to fix.

jeffdonahue added a commit that referenced this pull request Mar 18, 2015
Cross-channel LRN bounds checking for GPU implementation
@jeffdonahue jeffdonahue merged commit d02bb2c into BVLC:master Mar 18, 2015
@jeffdonahue
Copy link
Contributor

Thanks for the fix and new unit tests @erictzeng!

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.

normalizing using LRN layer

2 participants