params_ReductionTypes,
ReduceOpsLayerTest::getTestCaseName
);
+
+INSTANTIATE_TEST_CASE_P(
+ Reduce,
+ ReduceOpsLayerWithSpecificInputTest,
+ testing::Combine(
+ testing::ValuesIn(decltype(axes) {{0}, {1}}),
+ testing::Values(opTypes[1]),
+ testing::Values(true),
+ testing::Values(ngraph::helpers::ReductionType::Sum),
+ testing::Values(InferenceEngine::Precision::FP32,
+ InferenceEngine::Precision::I32),
+ testing::Values(std::vector<size_t> {2, 10}),
+ testing::Values(CommonTestUtils::DEVICE_CPU)),
+ ReduceOpsLayerWithSpecificInputTest::getTestCaseName
+);
+
} // namespace
TEST_P(ReduceOpsLayerTest, CompareWithRefs) {
Run();
-};
+}
+
+InferenceEngine::Blob::Ptr ReduceOpsLayerWithSpecificInputTest::GenerateInput(const InferenceEngine::InputInfo &info) const {
+ auto axis_vec = std::get<0>(GetParam());
+ IE_ASSERT(axis_vec.size() == 1);
+
+ auto axis = axis_vec[0];
+ auto td = info.getTensorDesc();
+ auto dims = td.getDims();
+
+ // Slice of tensor through axis is {1, 0, 0, ....}, the mean value is 1/slice_size
+ auto raw_values = std::vector<float>(dims[axis], 0);
+ raw_values[0] = 1;
+
+ auto blob = make_blob_with_precision(td);
+ blob->allocate();
+ CommonTestUtils::fill_data_with_broadcast(blob, axis, raw_values);
+ return blob;
+}
+
+TEST_P(ReduceOpsLayerWithSpecificInputTest, CompareWithRefs) {
+ Run();
+}
} // namespace LayerTestsDefinitions
\ No newline at end of file