BVLC/caffe — pull request #350 by longjon (2014-04-22 06:49:16+00:00)
Title: Make CheckGradientExhaustive fail for topless layers

Without this commit, it is possible to mistakenly call CheckGradientExhaustive on a layer with no top blobs (i.e., a loss layer), causing the gradient check to silently succeed while doing nothing. With this commit, doing so will cause the test to fail.

All existing tests continue to pass.

See, e.g., @aravindhm's comment in #258.