Remove use of convertOps2Nodes() & convert2OutVect() (#20837)
This commit is contained in:
1 parent
caa81a0b3c
commit
0955faef93
87 files changed
+185
-330
No files matched your search
+1
-2
@@ -103,14 +103,13 @@ void ConvolutionLayerTestFixture::SetUp() {
|
||||
std::tie(kernel, stride, padBegin, padEnd, dilation, convOutChannels, padType) = convParams;
|
||||
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShape))};
|
||||
auto paramOuts = ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<Parameter>(params));
|
||||
std::vector<float> filter_weights;
|
||||
|
||||
auto filter_size = std::accumulate(std::begin(kernel), std::end(kernel), 1, std::multiplies<size_t>());
|
||||
filter_weights =
|
||||
ov::test::utils::generate_float_numbers(convOutChannels * inputShape[1] * filter_size, -0.1f, 0.1f);
|
||||
|
||||
auto conv = std::dynamic_pointer_cast<Convolution>(ngraph::builder::makeConvolution(paramOuts[0],
|
||||
auto conv = std::dynamic_pointer_cast<Convolution>(ngraph::builder::makeConvolution(params[0],
|
||||
ngPrc,
|
||||
kernel,
|
||||
stride,
|
||||
|
||||
+2
-3
@@ -58,7 +58,6 @@ protected:
|
||||
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShapes[0])),
|
||||
std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShapes[1]))};
|
||||
std::vector<ngraph::Shape> WRB = {inputShapes[2], inputShapes[3], inputShapes[4]};
|
||||
auto in = ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(params));
|
||||
std::vector<float> weights_vals =
|
||||
ov::test::utils::generate_float_numbers(ngraph::shape_size(WRB[0]), -0.0001f, 0.0001f);
|
||||
std::vector<float> reccurrenceWeights_vals =
|
||||
@@ -70,8 +69,8 @@ protected:
|
||||
auto reccurrenceWeightsNode = ngraph::builder::makeConstant<float>(ngPrc, WRB[1], reccurrenceWeights_vals);
|
||||
auto biasNode = ngraph::builder::makeConstant<float>(ngPrc, WRB[2], bias_vals);
|
||||
|
||||
auto gru_cell = std::make_shared<ngraph::opset8::GRUCell>(in[0],
|
||||
in[1],
|
||||
auto gru_cell = std::make_shared<ngraph::opset8::GRUCell>(params[0],
|
||||
params[1],
|
||||
weightsNode,
|
||||
reccurrenceWeightsNode,
|
||||
biasNode,
|
||||
|
||||
+4
-5
@@ -62,7 +62,6 @@ protected:
|
||||
|
||||
std::vector<ngraph::Shape> WRB = {inputShapes[3], inputShapes[4], inputShapes[5], inputShapes[2]};
|
||||
|
||||
auto in = ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(params));
|
||||
std::vector<float> weights_vals =
|
||||
ov::test::utils::generate_float_numbers(ngraph::shape_size(WRB[0]), -0.0001f, 0.0001f);
|
||||
std::vector<float> reccurrenceWeights_vals =
|
||||
@@ -74,13 +73,13 @@ protected:
|
||||
auto reccurrenceWeightsNode = ngraph::builder::makeConstant<float>(ngPrc, WRB[1], reccurrenceWeights_vals);
|
||||
auto biasNode = ngraph::builder::makeConstant<float>(ngPrc, WRB[2], bias_vals);
|
||||
|
||||
std::vector<float> lengths(in[0].get_partial_shape()[0].get_min_length(),
|
||||
in[0].get_partial_shape()[1].get_min_length());
|
||||
std::vector<float> lengths(params[0]->get_partial_shape()[0].get_min_length(),
|
||||
params[0]->get_partial_shape()[1].get_min_length());
|
||||
std::shared_ptr<ngraph::Node> seq_length =
|
||||
ngraph::builder::makeConstant(ngraph::element::i64, WRB[3], lengths, false);
|
||||
|
||||
auto gru_sequence = std::make_shared<ngraph::opset8::GRUSequence>(in[0],
|
||||
in[1],
|
||||
auto gru_sequence = std::make_shared<ngraph::opset8::GRUSequence>(params[0],
|
||||
params[1],
|
||||
seq_length,
|
||||
weightsNode,
|
||||
reccurrenceWeightsNode,
|
||||
|
||||
+5
-6
@@ -61,7 +61,6 @@ protected:
|
||||
std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShapes[2]))};
|
||||
|
||||
std::vector<ngraph::Shape> WRB = {inputShapes[4], inputShapes[5], inputShapes[6], inputShapes[3]};
|
||||
auto in = ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(params));
|
||||
|
||||
std::vector<float> weights_vals =
|
||||
ov::test::utils::generate_float_numbers(ngraph::shape_size(WRB[0]), -0.0001f, 0.0001f);
|
||||
@@ -74,13 +73,13 @@ protected:
|
||||
auto reccurrenceWeightsNode = ngraph::builder::makeConstant<float>(ngPrc, WRB[1], reccurrenceWeights_vals);
|
||||
auto biasNode = ngraph::builder::makeConstant<float>(ngPrc, WRB[2], bias_vals);
|
||||
|
||||
std::vector<float> lengths(in[0].get_partial_shape()[0].get_min_length(),
|
||||
in[0].get_partial_shape()[1].get_min_length());
|
||||
std::vector<float> lengths(params[0]->get_partial_shape()[0].get_min_length(),
|
||||
params[0]->get_partial_shape()[1].get_min_length());
|
||||
std::shared_ptr<ngraph::Node> seq_length =
|
||||
ngraph::builder::makeConstant(ngraph::element::i64, WRB[3], lengths, false);
|
||||
auto lstm_sequence = std::make_shared<ngraph::opset8::LSTMSequence>(in[0],
|
||||
in[1],
|
||||
in[2],
|
||||
auto lstm_sequence = std::make_shared<ngraph::opset8::LSTMSequence>(params[0],
|
||||
params[1],
|
||||
params[2],
|
||||
seq_length,
|
||||
weightsNode,
|
||||
reccurrenceWeightsNode,
|
||||
|
||||
Reference in new issue
Block a user