namespace LayerTestsDefinitions {
std::string LrnLayerTest::getTestCaseName(testing::TestParamInfo<lrnLayerTestParamsSet> obj) {
- double alpha;
- size_t beta, bias, size;
+ double alpha, beta, bias;
+ size_t size;
+ std::vector<size_t> axes;
InferenceEngine::Precision netPrecision;
std::vector<size_t> inputShapes;
std::string targetDevice;
- std::tie(alpha, beta, bias, size, netPrecision, inputShapes, targetDevice) = obj.param;
+ std::tie(alpha, beta, bias, size, axes, netPrecision, inputShapes, targetDevice) = obj.param;
std::ostringstream result;
const char separator = '_';
result << "Beta=" << beta << separator;
result << "Bias=" << bias << separator;
result << "Size=" << size << separator;
+ result << "Axes=" << CommonTestUtils::vec2str(axes) << separator;
result << "netPRC=" << netPrecision.name() << separator;
result << "targetDevice=" << targetDevice;
void LrnLayerTest::SetUp() {
std::vector<size_t> inputShapes;
auto netPrecision = InferenceEngine::Precision::UNSPECIFIED;
- size_t alpha, beta, bias, size;
- std::tie(alpha, beta, bias, size, netPrecision, inputShapes, targetDevice) = GetParam();
+ double alpha, beta, bias;
+ size_t size;
+ std::vector<size_t> axes;
+ std::tie(alpha, beta, bias, size, axes, netPrecision, inputShapes, targetDevice) = GetParam();
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
auto params = ngraph::builder::makeParams(ngPrc, {inputShapes});
auto paramIn =
ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<ngraph::op::Parameter>(params));
- auto lrn = std::make_shared<ngraph::opset1::LRN>(paramIn[0], alpha, beta, bias, size);
- ngraph::ResultVector results {std::make_shared<ngraph::opset1::Result>(lrn)};
+ auto axes_node = std::make_shared<ngraph::op::Constant>(ngraph::element::i64, ngraph::Shape{axes.size()}, axes.data());
+ auto lrn = std::make_shared<ngraph::opset3::LRN>(paramIn[0], axes_node, alpha, beta, bias, size);
+ ngraph::ResultVector results {std::make_shared<ngraph::opset3::Result>(lrn)};
function = std::make_shared<ngraph::Function>(results, params, "lrn");
}