Fix for a random failure in this test due to floating point comparison. So, instead...
authorNishidha Panpaliya <nishidha@us.ibm.com>
Tue, 17 May 2016 06:14:53 +0000 (01:14 -0500)
committerNishidha Panpaliya <nishidha@us.ibm.com>
Mon, 11 Jul 2016 06:23:22 +0000 (01:23 -0500)
src/caffe/test/test_embed_layer.cpp

index dc7f5c4..13f13a8 100644 (file)
@@ -124,7 +124,7 @@ TYPED_TEST(EmbedLayerTest, TestForwardWithBias) {
     top_offset[4] = 0;
     bias_offset[0] = 0;
     for (int j = 0; j < kNumOutput; ++j) {
-      EXPECT_EQ(layer->blobs()[0]->data_at(weight_offset) +
+      EXPECT_FLOAT_EQ(layer->blobs()[0]->data_at(weight_offset) +
                 layer->blobs()[1]->data_at(bias_offset),
                 this->blob_top_->data_at(top_offset));
       ++top_offset[4];