diff --git a/src/caffe/test/test_net.cpp b/src/caffe/test/test_net.cpp index 782a96bc9b6..56959f4793b 100644 --- a/src/caffe/test/test_net.cpp +++ b/src/caffe/test/test_net.cpp @@ -288,6 +288,7 @@ class NetTest : public MultiDeviceTest { const bool force_backward = false, const bool bias_term = false, const Dtype blobs_lr_w1 = 1, const Dtype blobs_lr_b1 = 2, const Dtype blobs_lr_w2 = 1, const Dtype blobs_lr_b2 = 2) { + string bias_str = bias_term ? "true ":"false "; ostringstream proto; proto << "name: 'UnsharedWeightsNetwork' "; if (force_backward) { @@ -314,7 +315,7 @@ class NetTest : public MultiDeviceTest { " type: 'InnerProduct' " " inner_product_param { " " num_output: 10 " - " bias_term: " << bias_term << + " bias_term: " << bias_str << " weight_filler { " " type: 'gaussian' " " std: 10 " @@ -340,7 +341,7 @@ class NetTest : public MultiDeviceTest { " type: 'InnerProduct' " " inner_product_param { " " num_output: 10 " - " bias_term: " << bias_term << + " bias_term: " << bias_str << " weight_filler { " " type: 'gaussian' " " std: 10 " @@ -699,9 +700,11 @@ class NetTest : public MultiDeviceTest { " bottom: 'innerproduct' " " bottom: 'label_argmax' "; if (test_skip_true) - proto += " propagate_down: [true, false] "; + proto += " propagate_down: true " + " propagate_down: false "; else - proto += " propagate_down: [true, true] "; + proto += " propagate_down: true " + " propagate_down: true "; proto += " top: 'cross_entropy_loss' " " type: 'SigmoidCrossEntropyLoss' "