summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2015-09-23 20:40:16 (GMT)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2015-09-24 03:24:10 (GMT)
commitae77b15495d4c2a83202c49991bfc0885765de03 (patch)
treec5aa6d0811406117e5afb01bc810f2695549f86f
parent74e174537418b6a3c0c8708e444edf45ab491e94 (diff)
downloadcaffeonacl-ae77b15495d4c2a83202c49991bfc0885765de03.zip
caffeonacl-ae77b15495d4c2a83202c49991bfc0885765de03.tar.gz
caffeonacl-ae77b15495d4c2a83202c49991bfc0885765de03.tar.bz2
[test] TestReshape: expect instead of check
-rw-r--r--src/caffe/test/test_net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/caffe/test/test_net.cpp b/src/caffe/test/test_net.cpp
index ec01053..16c1d35 100644
--- a/src/caffe/test/test_net.cpp
+++ b/src/caffe/test/test_net.cpp
@@ -2306,7 +2306,7 @@ TYPED_TEST(NetTest, TestReshape) {
this->net_->ForwardPrefilled();
this->net_->Backward();
for (int i = 0; i < output1.count(); ++i) {
- CHECK_EQ(*(output1.cpu_data() + i), *(output_blob->cpu_data() + i));
+ EXPECT_FLOAT_EQ(*(output1.cpu_data() + i), *(output_blob->cpu_data() + i));
}
input_blob->Reshape(blob2.num(), blob2.channels(), blob2.height(),
@@ -2315,7 +2315,7 @@ TYPED_TEST(NetTest, TestReshape) {
this->net_->ForwardPrefilled();
this->net_->Backward();
for (int i = 0; i < output2.count(); ++i) {
- CHECK_EQ(*(output2.cpu_data() + i), *(output_blob->cpu_data() + i));
+ EXPECT_FLOAT_EQ(*(output2.cpu_data() + i), *(output_blob->cpu_data() + i));
}
}