diff options
-rw-r--r-- | src/caffe/test/test_net.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/caffe/test/test_net.cpp b/src/caffe/test/test_net.cpp index 12998d89..ec01053c 100644 --- a/src/caffe/test/test_net.cpp +++ b/src/caffe/test/test_net.cpp @@ -2269,8 +2269,10 @@ TYPED_TEST(NetTest, TestReshape) { FillerParameter filler_param; filler_param.set_std(1); GaussianFiller<Dtype> filler(filler_param); - Blob<Dtype> blob1(4, 3, 9, 11); - Blob<Dtype> blob2(2, 3, 12, 10); + // Check smaller shape first as larger first could hide realloc failures. + Blob<Dtype> blob1(2, 3, 12, 10); + Blob<Dtype> blob2(4, 3, 9, 11); + ASSERT_LT(blob1.count(), blob2.count()); filler.Fill(&blob1); filler.Fill(&blob2); |