Skip to content

Commit

Permalink
Make class MultinomialLogisticLossLayerTest derive from CPUDeviceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
flx42 committed May 26, 2015
1 parent 89bf3c3 commit 68133e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/caffe/test/test_multinomial_logistic_loss_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace caffe {

template <typename Dtype>
class MultinomialLogisticLossLayerTest : public ::testing::Test {
class MultinomialLogisticLossLayerTest : public CPUDeviceTest<Dtype> {
protected:
MultinomialLogisticLossLayerTest()
: blob_bottom_data_(new Blob<Dtype>(10, 5, 1, 1)),
Expand Down Expand Up @@ -51,7 +51,6 @@ TYPED_TEST_CASE(MultinomialLogisticLossLayerTest, TestDtypes);

TYPED_TEST(MultinomialLogisticLossLayerTest, TestGradientCPU) {
LayerParameter layer_param;
Caffe::set_mode(Caffe::CPU);
MultinomialLogisticLossLayer<TypeParam> layer(layer_param);
layer.SetUp(this->blob_bottom_vec_, this->blob_top_vec_);
GradientChecker<TypeParam> checker(1e-2, 2*1e-2, 1701, 0, 0.05);
Expand Down

0 comments on commit 68133e7

Please sign in to comment.