Refactor ngraph builders 2 (#21043)
* Deprecate makeBatchToSpace * Deprecate makeSpaceToBatch * Remove makeStridedSlice * Remove and deprecate makeSlice * Remove and deprecate makeMVN * Fix
This commit is contained in:
1 parent
aaa08d013a
commit
165f574d8f
23 files changed
+265
-143
No files matched your search
@@ -76,7 +76,10 @@ protected:
|
||||
params.push_back(std::make_shared<ov::op::v0::Parameter>(netPrecision, shape));
|
||||
|
||||
auto axesNode = ngraph::builder::makeConstant(axesType, ngraph::Shape{axes.size()}, axes);
|
||||
auto mvn = ngraph::builder::makeMVN6(params[0], axesNode, normalizeVariance, eps, eps_mode);
|
||||
ov::op::MVNEpsMode nEpsMode = ov::op::MVNEpsMode::INSIDE_SQRT;
|
||||
if (eps_mode == "outside_sqrt")
|
||||
nEpsMode = ov::op::MVNEpsMode::OUTSIDE_SQRT;
|
||||
auto mvn = std::make_shared<ov::op::v6::MVN>(params[0], axesNode, normalizeVariance, eps, nEpsMode);
|
||||
|
||||
rel_threshold = 0.015f;
|
||||
|
||||
|
||||
@@ -90,22 +90,36 @@ protected:
|
||||
inType = ov::element::Type(netPrecision);
|
||||
outType = ElementType::f32;
|
||||
|
||||
auto beginInput = ngraph::opset1::Constant::create(ngraph::element::i32, ngraph::Shape{1}, {2});
|
||||
auto endInput = ngraph::opset1::Constant::create(ngraph::element::i32, ngraph::Shape{1}, {4});
|
||||
auto strideInput = ngraph::opset1::Constant::create(ngraph::element::i32, ngraph::Shape{1}, {1});
|
||||
auto beginInput = ov::op::v0::Constant::create(ngraph::element::i32, ngraph::Shape{1}, {2});
|
||||
auto endInput = ov::op::v0::Constant::create(ngraph::element::i32, ngraph::Shape{1}, {4});
|
||||
auto strideInput = ov::op::v0::Constant::create(ngraph::element::i32, ngraph::Shape{1}, {1});
|
||||
|
||||
ov::ParameterVector functionParams;
|
||||
for (auto&& shape : inputDynamicShapes)
|
||||
functionParams.push_back(std::make_shared<ov::op::v0::Parameter>(inType, shape));
|
||||
|
||||
auto shapeOfOp1 = std::make_shared<opset3::ShapeOf>(functionParams[0], element::i32);
|
||||
auto shapeOfOp2 = std::make_shared<opset3::ShapeOf>(functionParams[1], element::i32);
|
||||
auto shapeOfOp1 = std::make_shared<ov::op::v3::ShapeOf>(functionParams[0], element::i32);
|
||||
auto shapeOfOp2 = std::make_shared<ov::op::v3::ShapeOf>(functionParams[1], element::i32);
|
||||
|
||||
auto stridedSliceOp1 = std::make_shared<ov::op::v1::StridedSlice>(shapeOfOp1,
|
||||
beginInput,
|
||||
endInput,
|
||||
strideInput,
|
||||
std::vector<int64_t>{0},
|
||||
std::vector<int64_t>{1},
|
||||
std::vector<int64_t>{0},
|
||||
std::vector<int64_t>{0},
|
||||
std::vector<int64_t>{0});
|
||||
|
||||
auto stridedSliceOp1 = ngraph::builder::makeStridedSlice(shapeOfOp1, beginInput, endInput, strideInput, element::i32,
|
||||
{0}, {1}, {0}, {0}, {0});
|
||||
auto stridedSliceOp2 = ngraph::builder::makeStridedSlice(shapeOfOp2, beginInput, endInput, strideInput, element::i32,
|
||||
{0}, {1}, {0}, {0}, {0});
|
||||
auto stridedSliceOp2 = std::make_shared<ov::op::v1::StridedSlice>(shapeOfOp2,
|
||||
beginInput,
|
||||
endInput,
|
||||
strideInput,
|
||||
std::vector<int64_t>{0},
|
||||
std::vector<int64_t>{1},
|
||||
std::vector<int64_t>{0},
|
||||
std::vector<int64_t>{0},
|
||||
std::vector<int64_t>{0});
|
||||
|
||||
switch (priorboxType) {
|
||||
case priorbox_type::Clustered: {
|
||||
|
||||
Reference in new issue
Block a user