Skip to content

Commit

Permalink
Added MVN layer. Renamed layer test data.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Lyudvichenko committed Aug 12, 2015
1 parent f8119ea commit df5eec6
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 9 deletions.
21 changes: 13 additions & 8 deletions modules/dnn/test/test_layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,42 +54,47 @@ static void testLayer(String basename, bool useCaffeModel = false)

TEST(Layer_Test_Softmax, Accuracy)
{
testLayer("softmax");
testLayer("layer_softmax");
}

TEST(Layer_Test_LRN_spatial, Accuracy)
{
testLayer("lrn_spatial");
testLayer("layer_lrn_spatial");
}

TEST(Layer_Test_LRN_channels, Accuracy)
{
testLayer("lrn_channels");
testLayer("layer_lrn_channels");
}

TEST(Layer_Test_Convolution, Accuracy)
{
testLayer("convolution", true);
testLayer("layer_convolution", true);
}

TEST(Layer_Test_InnerProduct, Accuracy)
{
testLayer("inner_product", true);
testLayer("layer_inner_product", true);
}

TEST(Layer_Test_Pooling_max, Accuracy)
{
testLayer("pooling_max");
testLayer("layer_pooling_max");
}

TEST(Layer_Test_Pooling_ave, Accuracy)
{
testLayer("pooling_ave");
testLayer("layer_pooling_ave");
}

TEST(Layer_Test_DeConvolution, Accuracy)
{
testLayer("deconvolution", true);
testLayer("layer_deconvolution", true);
}

TEST(Layer_Test_MVN, Accuracy)
{
testLayer("layer_mvn");
}

TEST(Layer_Test_Reshape, squeeze)
Expand Down
21 changes: 21 additions & 0 deletions modules/dnn/testdata/dnn/layers/layer_mvn.prototxt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "test_MVN_channels"
input: "input"

input_dim: 2
input_dim: 6
input_dim: 75
input_dim: 113

layer {
type: "MVN"

mvn_param {
eps: 0.1
across_channels: false
normalize_variance: true
}

name: "output"
bottom: "input"
top: "output"
}
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion modules/dnn/testdata/dnn/layers/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_cafe_output(inp_blob, proto_name, caffemodel_name):
return out_blob

if __name__ == '__main__':
proto_filenames = glob.glob("*.prototxt")
proto_filenames = glob.glob("layer_*.prototxt")

inp_blob = np.load('blob.npy')
print inp_blob.shape
Expand Down
Binary file not shown.

0 comments on commit df5eec6

Please sign in to comment.