make CheckGradientExhaustive fail for topless layers
authorJonathan L Long <jonlong@cs.berkeley.edu>
Tue, 22 Apr 2014 06:41:50 +0000 (23:41 -0700)
committerJonathan L Long <jonlong@cs.berkeley.edu>
Tue, 22 Apr 2014 06:41:50 +0000 (23:41 -0700)
commit29f78aa973ca995219b1851ffd90b98d078572d5
treee171dd0dd610b46ba7e9413a681c7abbd9359617
parentaeae177f38fce827b589f3719ad48de40025d702
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.
src/caffe/test/test_gradient_check_util.hpp