NodeVector -> OutputVector replacement (#1272)
authorKatarzyna Mitrus <katarzyna.mitrus@intel.com>
Wed, 29 Jul 2020 15:18:56 +0000 (17:18 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2020 15:18:56 +0000 (17:18 +0200)
294 files changed:
inference-engine/src/transformations/src/transformations/convert_batch_to_space.cpp
inference-engine/src/transformations/src/transformations/convert_space_to_batch.cpp
ngraph/src/ngraph/builder/matmul_factory.cpp
ngraph/src/ngraph/builder/matmul_factory.hpp
ngraph/src/ngraph/builder/quantization_utils.cpp
ngraph/src/ngraph/builder/quantization_utils.hpp
ngraph/src/ngraph/builder/quantized_concat_builder.cpp
ngraph/src/ngraph/builder/quantized_concat_builder.hpp
ngraph/src/ngraph/builder/split.cpp
ngraph/src/ngraph/builder/split.hpp
ngraph/src/ngraph/frontend/onnx_import/core/graph.cpp
ngraph/src/ngraph/frontend/onnx_import/core/graph.hpp
ngraph/src/ngraph/frontend/onnx_import/core/graph_cache.cpp
ngraph/src/ngraph/frontend/onnx_import/core/graph_cache.hpp
ngraph/src/ngraph/frontend/onnx_import/core/node.cpp
ngraph/src/ngraph/frontend/onnx_import/core/node.hpp
ngraph/src/ngraph/frontend/onnx_import/core/null_node.cpp
ngraph/src/ngraph/frontend/onnx_import/core/null_node.hpp
ngraph/src/ngraph/frontend/onnx_import/core/operator_set.hpp
ngraph/src/ngraph/frontend/onnx_import/op/abs.hpp
ngraph/src/ngraph/frontend/onnx_import/op/acos.hpp
ngraph/src/ngraph/frontend/onnx_import/op/acosh.hpp
ngraph/src/ngraph/frontend/onnx_import/op/add.cpp
ngraph/src/ngraph/frontend/onnx_import/op/add.hpp
ngraph/src/ngraph/frontend/onnx_import/op/and.hpp
ngraph/src/ngraph/frontend/onnx_import/op/argmax.cpp
ngraph/src/ngraph/frontend/onnx_import/op/argmax.hpp
ngraph/src/ngraph/frontend/onnx_import/op/argmin.cpp
ngraph/src/ngraph/frontend/onnx_import/op/argmin.hpp
ngraph/src/ngraph/frontend/onnx_import/op/asin.hpp
ngraph/src/ngraph/frontend/onnx_import/op/asinh.hpp
ngraph/src/ngraph/frontend/onnx_import/op/atan.hpp
ngraph/src/ngraph/frontend/onnx_import/op/atanh.hpp
ngraph/src/ngraph/frontend/onnx_import/op/average_pool.cpp
ngraph/src/ngraph/frontend/onnx_import/op/average_pool.hpp
ngraph/src/ngraph/frontend/onnx_import/op/batch_norm.cpp
ngraph/src/ngraph/frontend/onnx_import/op/batch_norm.hpp
ngraph/src/ngraph/frontend/onnx_import/op/cast.cpp
ngraph/src/ngraph/frontend/onnx_import/op/cast.hpp
ngraph/src/ngraph/frontend/onnx_import/op/ceil.hpp
ngraph/src/ngraph/frontend/onnx_import/op/clip.cpp
ngraph/src/ngraph/frontend/onnx_import/op/clip.hpp
ngraph/src/ngraph/frontend/onnx_import/op/concat.cpp
ngraph/src/ngraph/frontend/onnx_import/op/concat.hpp
ngraph/src/ngraph/frontend/onnx_import/op/constant.cpp
ngraph/src/ngraph/frontend/onnx_import/op/constant.hpp
ngraph/src/ngraph/frontend/onnx_import/op/constant_of_shape.cpp
ngraph/src/ngraph/frontend/onnx_import/op/constant_of_shape.hpp
ngraph/src/ngraph/frontend/onnx_import/op/conv.cpp
ngraph/src/ngraph/frontend/onnx_import/op/conv.hpp
ngraph/src/ngraph/frontend/onnx_import/op/conv_integer.cpp
ngraph/src/ngraph/frontend/onnx_import/op/conv_integer.hpp
ngraph/src/ngraph/frontend/onnx_import/op/conv_transpose.cpp
ngraph/src/ngraph/frontend/onnx_import/op/conv_transpose.hpp
ngraph/src/ngraph/frontend/onnx_import/op/cos.cpp
ngraph/src/ngraph/frontend/onnx_import/op/cos.hpp
ngraph/src/ngraph/frontend/onnx_import/op/cosh.cpp
ngraph/src/ngraph/frontend/onnx_import/op/cosh.hpp
ngraph/src/ngraph/frontend/onnx_import/op/cum_sum.cpp
ngraph/src/ngraph/frontend/onnx_import/op/cum_sum.hpp
ngraph/src/ngraph/frontend/onnx_import/op/depth_to_space.cpp
ngraph/src/ngraph/frontend/onnx_import/op/depth_to_space.hpp
ngraph/src/ngraph/frontend/onnx_import/op/dequantize_linear.cpp
ngraph/src/ngraph/frontend/onnx_import/op/dequantize_linear.hpp
ngraph/src/ngraph/frontend/onnx_import/op/div.hpp
ngraph/src/ngraph/frontend/onnx_import/op/dropout.hpp
ngraph/src/ngraph/frontend/onnx_import/op/elu.cpp
ngraph/src/ngraph/frontend/onnx_import/op/elu.hpp
ngraph/src/ngraph/frontend/onnx_import/op/equal.hpp
ngraph/src/ngraph/frontend/onnx_import/op/erf.hpp
ngraph/src/ngraph/frontend/onnx_import/op/exp.hpp
ngraph/src/ngraph/frontend/onnx_import/op/expand.cpp
ngraph/src/ngraph/frontend/onnx_import/op/expand.hpp
ngraph/src/ngraph/frontend/onnx_import/op/eye_like.cpp
ngraph/src/ngraph/frontend/onnx_import/op/eye_like.hpp
ngraph/src/ngraph/frontend/onnx_import/op/fake_quantize.cpp
ngraph/src/ngraph/frontend/onnx_import/op/fake_quantize.hpp
ngraph/src/ngraph/frontend/onnx_import/op/flatten.cpp
ngraph/src/ngraph/frontend/onnx_import/op/flatten.hpp
ngraph/src/ngraph/frontend/onnx_import/op/floor.hpp
ngraph/src/ngraph/frontend/onnx_import/op/gather.hpp
ngraph/src/ngraph/frontend/onnx_import/op/gather_nd.cpp
ngraph/src/ngraph/frontend/onnx_import/op/gather_nd.hpp
ngraph/src/ngraph/frontend/onnx_import/op/gemm.cpp
ngraph/src/ngraph/frontend/onnx_import/op/gemm.hpp
ngraph/src/ngraph/frontend/onnx_import/op/global_average_pool.cpp
ngraph/src/ngraph/frontend/onnx_import/op/global_average_pool.hpp
ngraph/src/ngraph/frontend/onnx_import/op/global_max_pool.cpp
ngraph/src/ngraph/frontend/onnx_import/op/global_max_pool.hpp
ngraph/src/ngraph/frontend/onnx_import/op/greater.hpp
ngraph/src/ngraph/frontend/onnx_import/op/gru.cpp
ngraph/src/ngraph/frontend/onnx_import/op/gru.hpp
ngraph/src/ngraph/frontend/onnx_import/op/hard_sigmoid.cpp
ngraph/src/ngraph/frontend/onnx_import/op/hard_sigmoid.hpp
ngraph/src/ngraph/frontend/onnx_import/op/hardmax.cpp
ngraph/src/ngraph/frontend/onnx_import/op/hardmax.hpp
ngraph/src/ngraph/frontend/onnx_import/op/identity.hpp
ngraph/src/ngraph/frontend/onnx_import/op/image_scaler.cpp
ngraph/src/ngraph/frontend/onnx_import/op/image_scaler.hpp
ngraph/src/ngraph/frontend/onnx_import/op/instance_norm.cpp
ngraph/src/ngraph/frontend/onnx_import/op/instance_norm.hpp
ngraph/src/ngraph/frontend/onnx_import/op/leaky_relu.cpp
ngraph/src/ngraph/frontend/onnx_import/op/leaky_relu.hpp
ngraph/src/ngraph/frontend/onnx_import/op/less.hpp
ngraph/src/ngraph/frontend/onnx_import/op/log.cpp
ngraph/src/ngraph/frontend/onnx_import/op/log.hpp
ngraph/src/ngraph/frontend/onnx_import/op/log_softmax.cpp
ngraph/src/ngraph/frontend/onnx_import/op/log_softmax.hpp
ngraph/src/ngraph/frontend/onnx_import/op/loop.cpp
ngraph/src/ngraph/frontend/onnx_import/op/loop.hpp
ngraph/src/ngraph/frontend/onnx_import/op/lp_norm.cpp
ngraph/src/ngraph/frontend/onnx_import/op/lp_norm.hpp
ngraph/src/ngraph/frontend/onnx_import/op/lp_pool.cpp
ngraph/src/ngraph/frontend/onnx_import/op/lp_pool.hpp
ngraph/src/ngraph/frontend/onnx_import/op/lrn.cpp
ngraph/src/ngraph/frontend/onnx_import/op/lrn.hpp
ngraph/src/ngraph/frontend/onnx_import/op/lstm.cpp
ngraph/src/ngraph/frontend/onnx_import/op/lstm.hpp
ngraph/src/ngraph/frontend/onnx_import/op/matmul.hpp
ngraph/src/ngraph/frontend/onnx_import/op/matmul_integer.cpp
ngraph/src/ngraph/frontend/onnx_import/op/matmul_integer.hpp
ngraph/src/ngraph/frontend/onnx_import/op/max.hpp
ngraph/src/ngraph/frontend/onnx_import/op/max_pool.cpp
ngraph/src/ngraph/frontend/onnx_import/op/max_pool.hpp
ngraph/src/ngraph/frontend/onnx_import/op/mean.cpp
ngraph/src/ngraph/frontend/onnx_import/op/mean.hpp
ngraph/src/ngraph/frontend/onnx_import/op/mean_variance_normalization.cpp
ngraph/src/ngraph/frontend/onnx_import/op/mean_variance_normalization.hpp
ngraph/src/ngraph/frontend/onnx_import/op/min.hpp
ngraph/src/ngraph/frontend/onnx_import/op/mod.cpp
ngraph/src/ngraph/frontend/onnx_import/op/mod.hpp
ngraph/src/ngraph/frontend/onnx_import/op/mul.hpp
ngraph/src/ngraph/frontend/onnx_import/op/neg.hpp
ngraph/src/ngraph/frontend/onnx_import/op/non_max_suppression.cpp
ngraph/src/ngraph/frontend/onnx_import/op/non_max_suppression.hpp
ngraph/src/ngraph/frontend/onnx_import/op/non_zero.cpp
ngraph/src/ngraph/frontend/onnx_import/op/non_zero.hpp
ngraph/src/ngraph/frontend/onnx_import/op/not.hpp
ngraph/src/ngraph/frontend/onnx_import/op/onehot.cpp
ngraph/src/ngraph/frontend/onnx_import/op/onehot.hpp
ngraph/src/ngraph/frontend/onnx_import/op/or.hpp
ngraph/src/ngraph/frontend/onnx_import/op/pad.cpp
ngraph/src/ngraph/frontend/onnx_import/op/pad.hpp
ngraph/src/ngraph/frontend/onnx_import/op/pow.hpp
ngraph/src/ngraph/frontend/onnx_import/op/prelu.cpp
ngraph/src/ngraph/frontend/onnx_import/op/prelu.hpp
ngraph/src/ngraph/frontend/onnx_import/op/qlinear_matmul.cpp
ngraph/src/ngraph/frontend/onnx_import/op/qlinear_matmul.hpp
ngraph/src/ngraph/frontend/onnx_import/op/quant_conv.cpp
ngraph/src/ngraph/frontend/onnx_import/op/quant_conv.hpp
ngraph/src/ngraph/frontend/onnx_import/op/quantize_linear.cpp
ngraph/src/ngraph/frontend/onnx_import/op/quantize_linear.hpp
ngraph/src/ngraph/frontend/onnx_import/op/range.cpp
ngraph/src/ngraph/frontend/onnx_import/op/range.hpp
ngraph/src/ngraph/frontend/onnx_import/op/reciprocal.cpp
ngraph/src/ngraph/frontend/onnx_import/op/reciprocal.hpp
ngraph/src/ngraph/frontend/onnx_import/op/reduce.cpp
ngraph/src/ngraph/frontend/onnx_import/op/reduce.hpp
ngraph/src/ngraph/frontend/onnx_import/op/relu.hpp
ngraph/src/ngraph/frontend/onnx_import/op/reshape.cpp
ngraph/src/ngraph/frontend/onnx_import/op/reshape.hpp
ngraph/src/ngraph/frontend/onnx_import/op/resize.cpp
ngraph/src/ngraph/frontend/onnx_import/op/resize.hpp
ngraph/src/ngraph/frontend/onnx_import/op/reverse_sequence.cpp
ngraph/src/ngraph/frontend/onnx_import/op/reverse_sequence.hpp
ngraph/src/ngraph/frontend/onnx_import/op/rnn.cpp
ngraph/src/ngraph/frontend/onnx_import/op/rnn.hpp
ngraph/src/ngraph/frontend/onnx_import/op/roi_align.cpp
ngraph/src/ngraph/frontend/onnx_import/op/roi_align.hpp
ngraph/src/ngraph/frontend/onnx_import/op/round.cpp
ngraph/src/ngraph/frontend/onnx_import/op/round.hpp
ngraph/src/ngraph/frontend/onnx_import/op/scatter_elements.cpp
ngraph/src/ngraph/frontend/onnx_import/op/scatter_elements.hpp
ngraph/src/ngraph/frontend/onnx_import/op/scatter_nd.cpp
ngraph/src/ngraph/frontend/onnx_import/op/scatter_nd.hpp
ngraph/src/ngraph/frontend/onnx_import/op/selu.cpp
ngraph/src/ngraph/frontend/onnx_import/op/selu.hpp
ngraph/src/ngraph/frontend/onnx_import/op/shape.cpp
ngraph/src/ngraph/frontend/onnx_import/op/shape.hpp
ngraph/src/ngraph/frontend/onnx_import/op/shrink.cpp
ngraph/src/ngraph/frontend/onnx_import/op/shrink.hpp
ngraph/src/ngraph/frontend/onnx_import/op/sigmoid.hpp
ngraph/src/ngraph/frontend/onnx_import/op/sign.hpp
ngraph/src/ngraph/frontend/onnx_import/op/sin.hpp
ngraph/src/ngraph/frontend/onnx_import/op/sinh.hpp
ngraph/src/ngraph/frontend/onnx_import/op/size.cpp
ngraph/src/ngraph/frontend/onnx_import/op/size.hpp
ngraph/src/ngraph/frontend/onnx_import/op/slice.cpp
ngraph/src/ngraph/frontend/onnx_import/op/slice.hpp
ngraph/src/ngraph/frontend/onnx_import/op/softmax.cpp
ngraph/src/ngraph/frontend/onnx_import/op/softmax.hpp
ngraph/src/ngraph/frontend/onnx_import/op/softplus.cpp
ngraph/src/ngraph/frontend/onnx_import/op/softplus.hpp
ngraph/src/ngraph/frontend/onnx_import/op/softsign.cpp
ngraph/src/ngraph/frontend/onnx_import/op/softsign.hpp
ngraph/src/ngraph/frontend/onnx_import/op/space_to_depth.cpp
ngraph/src/ngraph/frontend/onnx_import/op/space_to_depth.hpp
ngraph/src/ngraph/frontend/onnx_import/op/split.cpp
ngraph/src/ngraph/frontend/onnx_import/op/split.hpp
ngraph/src/ngraph/frontend/onnx_import/op/sqrt.hpp
ngraph/src/ngraph/frontend/onnx_import/op/squeeze.cpp
ngraph/src/ngraph/frontend/onnx_import/op/squeeze.hpp
ngraph/src/ngraph/frontend/onnx_import/op/sub.hpp
ngraph/src/ngraph/frontend/onnx_import/op/sum.hpp
ngraph/src/ngraph/frontend/onnx_import/op/supported_ops.md
ngraph/src/ngraph/frontend/onnx_import/op/tan.hpp
ngraph/src/ngraph/frontend/onnx_import/op/tanh.hpp
ngraph/src/ngraph/frontend/onnx_import/op/thresholded_relu.cpp
ngraph/src/ngraph/frontend/onnx_import/op/thresholded_relu.hpp
ngraph/src/ngraph/frontend/onnx_import/op/tile.cpp
ngraph/src/ngraph/frontend/onnx_import/op/tile.hpp
ngraph/src/ngraph/frontend/onnx_import/op/topk.cpp
ngraph/src/ngraph/frontend/onnx_import/op/topk.hpp
ngraph/src/ngraph/frontend/onnx_import/op/transpose.cpp
ngraph/src/ngraph/frontend/onnx_import/op/transpose.hpp
ngraph/src/ngraph/frontend/onnx_import/op/unsqueeze.cpp
ngraph/src/ngraph/frontend/onnx_import/op/unsqueeze.hpp
ngraph/src/ngraph/frontend/onnx_import/op/upsample.cpp
ngraph/src/ngraph/frontend/onnx_import/op/upsample.hpp
ngraph/src/ngraph/frontend/onnx_import/op/where.hpp
ngraph/src/ngraph/frontend/onnx_import/op/xor.hpp
ngraph/src/ngraph/frontend/onnx_import/utils/arg_min_max_factory.hpp
ngraph/src/ngraph/frontend/onnx_import/utils/convpool.cpp
ngraph/src/ngraph/frontend/onnx_import/utils/pooling_factory.cpp
ngraph/src/ngraph/frontend/onnx_import/utils/pooling_factory.hpp
ngraph/src/ngraph/frontend/onnx_import/utils/recurrent.cpp
ngraph/src/ngraph/frontend/onnx_import/utils/recurrent.hpp
ngraph/src/ngraph/frontend/onnx_import/utils/reduction.cpp
ngraph/src/ngraph/frontend/onnx_import/utils/reduction.hpp
ngraph/src/ngraph/frontend/onnx_import/utils/reshape.cpp
ngraph/src/ngraph/frontend/onnx_import/utils/reshape.hpp
ngraph/src/ngraph/frontend/onnx_import/utils/variadic.hpp
ngraph/src/ngraph/node.cpp
ngraph/src/ngraph/node.hpp
ngraph/src/ngraph/op/fused/batch_to_space.cpp
ngraph/src/ngraph/op/fused/batch_to_space.hpp
ngraph/src/ngraph/op/fused/clamp.cpp
ngraph/src/ngraph/op/fused/clamp.hpp
ngraph/src/ngraph/op/fused/depth_to_space.cpp
ngraph/src/ngraph/op/fused/depth_to_space.hpp
ngraph/src/ngraph/op/fused/fake_quantize.cpp
ngraph/src/ngraph/op/fused/fake_quantize.hpp
ngraph/src/ngraph/op/fused/gelu.cpp
ngraph/src/ngraph/op/fused/gelu.hpp
ngraph/src/ngraph/op/fused/grn.cpp
ngraph/src/ngraph/op/fused/grn.hpp
ngraph/src/ngraph/op/fused/gru_cell.cpp
ngraph/src/ngraph/op/fused/gru_cell.hpp
ngraph/src/ngraph/op/fused/hard_sigmoid.cpp
ngraph/src/ngraph/op/fused/hard_sigmoid.hpp
ngraph/src/ngraph/op/fused/lstm_cell.cpp
ngraph/src/ngraph/op/fused/lstm_cell.hpp
ngraph/src/ngraph/op/fused/lstm_sequence.cpp
ngraph/src/ngraph/op/fused/lstm_sequence.hpp
ngraph/src/ngraph/op/fused/matmul.cpp
ngraph/src/ngraph/op/fused/matmul.hpp
ngraph/src/ngraph/op/fused/mod.cpp
ngraph/src/ngraph/op/fused/mod.hpp
ngraph/src/ngraph/op/fused/mvn.cpp
ngraph/src/ngraph/op/fused/mvn.hpp
ngraph/src/ngraph/op/fused/normalize_l2.cpp
ngraph/src/ngraph/op/fused/normalize_l2.hpp
ngraph/src/ngraph/op/fused/prelu.cpp
ngraph/src/ngraph/op/fused/prelu.hpp
ngraph/src/ngraph/op/fused/rnn_cell.cpp
ngraph/src/ngraph/op/fused/rnn_cell.hpp
ngraph/src/ngraph/op/fused/selu.cpp
ngraph/src/ngraph/op/fused/selu.hpp
ngraph/src/ngraph/op/fused/shuffle_channels.cpp
ngraph/src/ngraph/op/fused/shuffle_channels.hpp
ngraph/src/ngraph/op/fused/space_to_batch.cpp
ngraph/src/ngraph/op/fused/space_to_batch.hpp
ngraph/src/ngraph/op/fused/space_to_depth.cpp
ngraph/src/ngraph/op/fused/space_to_depth.hpp
ngraph/src/ngraph/op/fused/squared_difference.cpp
ngraph/src/ngraph/op/fused/squared_difference.hpp
ngraph/src/ngraph/op/fused/squeeze.cpp
ngraph/src/ngraph/op/fused/squeeze.hpp
ngraph/src/ngraph/op/fused/stack.cpp
ngraph/src/ngraph/op/fused/stack.hpp
ngraph/src/ngraph/op/fused/unsqueeze.cpp
ngraph/src/ngraph/op/fused/unsqueeze.hpp
ngraph/src/ngraph/op/group_conv.cpp
ngraph/src/ngraph/op/group_conv.hpp
ngraph/src/ngraph/op/split.cpp
ngraph/src/ngraph/op/split.hpp
ngraph/src/ngraph/op/tensor_iterator.cpp
ngraph/src/ngraph/op/tensor_iterator.hpp
ngraph/src/ngraph/op/util/fused_op.cpp
ngraph/src/ngraph/pass/constant_folding_split.cpp
ngraph/src/ngraph/pass/constant_folding_variadic_split.cpp
ngraph/test/onnx/onnx_import.in.cpp
ngraph/test/provenance.cpp
ngraph/test/runtime/pass/fused_op_decomposition.cpp

index b8f1dfd..57e7f33 100644 (file)
@@ -23,8 +23,8 @@ void ngraph::pass::ConvertBatchToSpace::convert_batch_to_space() {
             return false;
         }
         auto last_node = batch_to_space->decompose_op()[0];
-        last_node->set_friendly_name(batch_to_space->get_friendly_name());
-        ngraph::replace_node(batch_to_space, last_node);
+        last_node.get_node()->set_friendly_name(batch_to_space->get_friendly_name());
+        ngraph::replace_node(batch_to_space, last_node.get_node_shared_ptr());
         return true;
     };
 
index 4d4ed66..3f4d74b 100644 (file)
@@ -23,8 +23,8 @@ void ngraph::pass::ConvertSpaceToBatch::convert_space_to_batch() {
             return false;
         }
         auto last_node = space_to_batch->decompose_op()[0];
-        last_node->set_friendly_name(space_to_batch->get_friendly_name());
-        ngraph::replace_node(space_to_batch, last_node);
+        last_node.get_node()->set_friendly_name(space_to_batch->get_friendly_name());
+        ngraph::replace_node(space_to_batch, last_node.get_node_shared_ptr());
         return true;
     };
 
index 0a054ba..10634db 100644 (file)
@@ -68,7 +68,7 @@ Output<Node> builder::MatmulFactory::get_right()
     return m_inputs.at(1);
 }
 
-NodeVector builder::MatmulFactory::make_matmul_op()
+OutputVector builder::MatmulFactory::make_matmul_op()
 {
     auto left = get_left();
     auto right = get_right();
index fec7203..43bcaea 100644 (file)
@@ -40,8 +40,8 @@ namespace ngraph
 
             /// \brief Create a sub-graph representing an ONNX MatMul operation.
             ///
-            /// \return NodeVector containing the sub-graph output node.
-            virtual NodeVector make_matmul_op();
+            /// \return OutputVector containing the sub-graph output node.
+            virtual OutputVector make_matmul_op();
 
         protected:
             /// \return Output representing the left operand.
index dea0a8c..2b5c2c1 100644 (file)
@@ -172,8 +172,9 @@ namespace ngraph
                 }
             }
 
-            void
-                check_concat(const NodeVector& args, const NodeVector& mins, const NodeVector& maxs)
+            void check_concat(const OutputVector& args,
+                              const OutputVector& mins,
+                              const OutputVector& maxs)
             {
                 auto size = args.size();
                 if (size != mins.size() || size != maxs.size())
@@ -184,17 +185,17 @@ namespace ngraph
                 {
                     auto min = mins[i];
                     auto max = maxs[i];
-                    auto type = min->get_element_type();
-                    if (type != max->get_element_type())
+                    auto type = min.get_element_type();
+                    if (type != max.get_element_type())
                     {
                         throw ngraph_error("check_concat: min and max must have same type");
                     }
 
-                    if (min->get_shape() != Shape{1} || max->get_shape() != Shape{1})
+                    if (min.get_shape() != Shape{1} || max.get_shape() != Shape{1})
                     {
                         throw ngraph_error("check_concat: min/max shape not Shape{1}: " +
-                                           vector_to_string(min->get_shape()) +
-                                           vector_to_string(max->get_shape()));
+                                           vector_to_string(min.get_shape()) +
+                                           vector_to_string(max.get_shape()));
                     }
                 }
             }
index eb89b80..f17b18d 100644 (file)
@@ -64,9 +64,9 @@ namespace ngraph
                                                 const ngraph::element::Type& output_type,
                                                 const bool requantize = true);
 
-            void check_concat(const NodeVector& args,
-                              const NodeVector& mins,
-                              const NodeVector& maxs);
+            void check_concat(const OutputVector& args,
+                              const OutputVector& mins,
+                              const OutputVector& maxs);
         }
     }
 }
index 2201b62..97a1916 100644 (file)
@@ -25,28 +25,28 @@ namespace ngraph
 {
     namespace builder
     {
-        shared_ptr<Node> QuantizedConcatBuilder(const NodeVector& args,
+        shared_ptr<Node> QuantizedConcatBuilder(const OutputVector& args,
                                                 size_t concatenation_axis,
-                                                const NodeVector& mins,
-                                                const NodeVector& maxs)
+                                                const OutputVector& mins,
+                                                const OutputVector& maxs)
         {
             quantization_utils::check_concat(args, mins, maxs);
-            auto quant_type = args[0]->get_element_type();
+            auto quant_type = args[0].get_element_type();
 
             // output scale
             auto min = make_shared<op::Min>(make_shared<op::Concat>(mins, 0), ngraph::AxisSet{0});
             auto max = make_shared<op::Max>(make_shared<op::Concat>(maxs, 0), ngraph::AxisSet{0});
             auto out_scale = quantization_utils::get_scale(min, max, quant_type);
 
-            NodeVector rescaled_args(args.size());
+            OutputVector rescaled_args(args.size());
             for (size_t i = 0; i < args.size(); ++i)
             {
-                auto q_type = args[i]->get_element_type();
+                auto q_type = args[i].get_element_type();
                 auto in_scale = make_shared<ngraph::op::Reshape>(
                     quantization_utils::get_scale(mins[i], maxs[i], q_type),
                     AxisVector{0},
                     Shape{});
-                auto zero = make_constant(q_type, in_scale->get_shape(), 0);
+                auto zero = make_constant(q_type, in_scale->get_output_shape(0), 0);
 
                 rescaled_args[i] =
                     make_shared<op::Dequantize>(args[i], in_scale, zero, element::f32, AxisSet{});
@@ -58,7 +58,7 @@ namespace ngraph
                                               AxisSet{},
                                               op::Quantize::RoundMode::ROUND_NEAREST_TOWARD_EVEN);
             }
-            OutputVector base = as_output_vector(args);
+            OutputVector base = args;
             for (auto node : mins)
             {
                 base.push_back(node);
index 0606ac5..71b2c1f 100644 (file)
@@ -32,9 +32,9 @@ namespace ngraph
     namespace builder
     {
         NGRAPH_API
-        std::shared_ptr<Node> QuantizedConcatBuilder(const NodeVector& args,
+        std::shared_ptr<Node> QuantizedConcatBuilder(const OutputVector& args,
                                                      size_t concatenation_axis,
-                                                     const NodeVector& mins,
-                                                     const NodeVector& maxs);
+                                                     const OutputVector& mins,
+                                                     const OutputVector& maxs);
     }
 }
index f83a56a..9fd8da4 100644 (file)
@@ -47,37 +47,13 @@ namespace
             std::make_shared<op::Slice>(output, lower_bounds, upper_bounds)
                 ->add_provenance_group_members_above({output}));
     }
-
-    /// \brief Return the outputs of the node as vector.
-    ///
-    /// \param[in] node            Node with multiple outputs.
-    ///
-    /// \return                    Vector of outputs of input node.
-    NodeVector get_outputs(const std::shared_ptr<ngraph::Node>& node)
-    {
-        const auto outputs_number = node->get_output_size();
-        ngraph::NodeVector outputs(outputs_number);
-        for (int i = 0; i < outputs_number; ++i)
-        {
-            if (node->output(i).get_node_shared_ptr()->get_output_size() == 1)
-            {
-                outputs[i] = node->get_output_as_single_output_node(i);
-            }
-            else
-            {
-                outputs[i] = std::make_shared<op::GetOutputElement>(node, i);
-            }
-        }
-        return outputs;
-    }
 }
 
-NodeVector builder::split(const Output<ngraph::Node>& value,
-                          const std::vector<size_t>& length_parts,
-                          size_t axis)
+OutputVector
+    builder::split(const Output<Node>& value, const std::vector<size_t>& length_parts, size_t axis)
 {
     size_t start_index{0};
-    NodeVector outputs;
+    OutputVector outputs;
     for (const auto& length_part : length_parts)
     {
         size_t end_index{start_index + length_part};
@@ -87,7 +63,7 @@ NodeVector builder::split(const Output<ngraph::Node>& value,
     return outputs;
 }
 
-NodeVector builder::split(const Output<Node>& value, size_t split_parts, int axis)
+OutputVector builder::split(const Output<Node>& value, size_t split_parts, int axis)
 {
     size_t axis_to_split{static_cast<size_t>(axis)};
     if (axis < 0)
@@ -100,9 +76,9 @@ NodeVector builder::split(const Output<Node>& value, size_t split_parts, int axi
     return split(value, length_parts, axis_to_split);
 }
 
-NodeVector builder::opset1::split(const Output<Node>& value,
-                                  const std::vector<size_t>& split_lengths,
-                                  int64_t axis)
+OutputVector builder::opset1::split(const Output<Node>& value,
+                                    const std::vector<size_t>& split_lengths,
+                                    int64_t axis)
 {
     const auto axis_node = ngraph::opset1::Constant::create(element::u64, Shape{}, {axis});
     const auto split_lengths_node =
@@ -110,13 +86,13 @@ NodeVector builder::opset1::split(const Output<Node>& value,
     const auto variadic_split =
         std::make_shared<ngraph::opset1::VariadicSplit>(value, axis_node, split_lengths_node);
 
-    return get_outputs(variadic_split);
+    return variadic_split->outputs();
 }
 
-NodeVector builder::opset1::split(const Output<Node>& value, size_t num_splits, int64_t axis)
+OutputVector builder::opset1::split(const Output<Node>& value, size_t num_splits, int64_t axis)
 {
     const auto axis_node = ngraph::opset1::Constant::create(element::u64, Shape{}, {axis});
     const auto split = std::make_shared<ngraph::opset1::Split>(value, axis_node, num_splits);
 
-    return get_outputs(split);
+    return split->outputs();
 }
index 5bff12b..08ae980 100644 (file)
@@ -31,9 +31,9 @@ namespace ngraph
         ///
         /// \return     The vector containing multiple nodes we split input node into.
         ///
-        NodeVector split(const Output<Node>& value,
-                         const std::vector<size_t>& length_parts,
-                         size_t axis = 0);
+        OutputVector split(const Output<Node>& value,
+                           const std::vector<size_t>& length_parts,
+                           size_t axis = 0);
 
         /// \brief      Split node on specified axis into multiple parts.
         ///
@@ -47,9 +47,9 @@ namespace ngraph
         ///             indexing). This means that the axis to split on will be counted from
         ///             the back of the tensor (negative values are subtracted from its rank).
         ///
-        /// \return     The vector containing multiple nodes we split input node into.
+        /// \return     The vector containing multiple outputs we split input node into.
         ///
-        NodeVector split(const Output<Node>& value, size_t split_parts, int axis = 0);
+        OutputVector split(const Output<Node>& value, size_t split_parts, int axis = 0);
 
         namespace opset1
         {
@@ -63,13 +63,13 @@ namespace ngraph
             ///             indexing). This means that the axis to split on will be counted from
             ///             the back of the tensor (negative values are subtracted from its rank).
             ///
-            /// \return     The vector containing multiple nodes we split input node into.
+            /// \return     The vector containing multiple outputs we split input node into.
             ///             The vector is output of Split:v1 op
             ///
             NGRAPH_API
-            NodeVector split(const Output<Node>& value,
-                             const std::vector<size_t>& split_lengths,
-                             int64_t axis = 0);
+            OutputVector split(const Output<Node>& value,
+                               const std::vector<size_t>& split_lengths,
+                               int64_t axis = 0);
 
             /// \brief      Split value on specified axis into multiple parts.
             ///
@@ -88,7 +88,7 @@ namespace ngraph
             ///             The vector is output of VariadicSplit:v1 op
             ///
             NGRAPH_API
-            NodeVector split(const Output<Node>& value, size_t num_splits, int64_t axis = 0);
+            OutputVector split(const Output<Node>& value, size_t num_splits, int64_t axis = 0);
         }
     } // namespace builder
 } // namespace ngraph
index 780fb60..7e9dd7e 100644 (file)
@@ -157,7 +157,7 @@ namespace ngraph
                 m_nodes.emplace_back(node_proto, *this);
                 const Node& node{m_nodes.back()};
 
-                NodeVector ng_nodes{node.get_ng_nodes()};
+                OutputVector ng_nodes{node.get_ng_nodes()};
                 // Iterate over the number of outputs for given node in graph.
                 // Some of them may be optional and trimmed. See:
                 // https://github.com/onnx/onnx/blob/master/docs/IR.md#optional-inputs-and-outputs
@@ -174,14 +174,14 @@ namespace ngraph
             return m_cache->contains(name);
         }
 
-        std::shared_ptr<ngraph::Node> Graph::get_ng_node_from_cache(const std::string& name) const
+        Output<ngraph::Node> Graph::get_ng_node_from_cache(const std::string& name) const
         {
             return m_cache->get_node(name);
         }
 
-        NodeVector Graph::get_ng_outputs() const
+        OutputVector Graph::get_ng_outputs() const
         {
-            NodeVector results;
+            OutputVector results;
             for (const auto& output : m_graph_proto->output())
             {
                 results.emplace_back(get_ng_node_from_cache(output.name()));
@@ -189,11 +189,11 @@ namespace ngraph
             return results;
         }
 
-        NodeVector Graph::make_ng_nodes(const Node& onnx_node) const
+        OutputVector Graph::make_ng_nodes(const Node& onnx_node) const
         {
             const auto ng_node_factory =
                 m_model->get_operator(onnx_node.op_type(), onnx_node.domain());
-            NodeVector ng_node_vector;
+            OutputVector ng_node_vector;
             try
             {
                 ng_node_vector = ng_node_factory(onnx_node);
@@ -223,7 +223,7 @@ namespace ngraph
         }
 
         void Graph::set_friendly_names(const Node& onnx_node,
-                                       const NodeVector& ng_node_vector) const
+                                       const OutputVector& ng_node_vector) const
         {
             for (int i = 0; i < ng_node_vector.size(); ++i)
             {
@@ -234,7 +234,7 @@ namespace ngraph
                     break;
                 }
 
-                ng_node_vector[i]->set_friendly_name(onnx_node.output(i));
+                ng_node_vector[i].get_node()->set_friendly_name(onnx_node.output(i));
             }
         }
 
@@ -267,7 +267,7 @@ namespace ngraph
         }
 
         void Graph::add_provenance_tags(const Node& onnx_node,
-                                        const NodeVector& ng_node_vector) const
+                                        const OutputVector& ng_node_vector) const
         {
             if (!ngraph::get_provenance_enabled())
             {
@@ -278,9 +278,9 @@ namespace ngraph
             const auto ng_inputs = onnx_node.get_ng_inputs();
 
             ngraph::traverse_nodes(
-                ng_node_vector,
+                as_node_vector(ng_node_vector),
                 [&tag](std::shared_ptr<ngraph::Node> ng_node) { ng_node->add_provenance_tag(tag); },
-                ng_inputs);
+                as_node_vector(ng_inputs));
         }
 
         Subgraph::Subgraph(const ONNX_NAMESPACE::GraphProto& proto,
index 55e6b24..c3f2eb1 100644 (file)
@@ -39,12 +39,12 @@ namespace ngraph
             const std::vector<Node>& get_nodes() const { return m_nodes; }
             const std::vector<ValueInfo>& get_inputs() const { return m_inputs; }
             const std::vector<ValueInfo>& get_outputs() const { return m_outputs; }
-            NodeVector get_ng_outputs() const;
+            OutputVector get_ng_outputs() const;
             const ParameterVector& get_ng_parameters() const { return m_parameters; }
             bool is_node_in_cache(const std::string& name) const;
-            std::shared_ptr<ngraph::Node> get_ng_node_from_cache(const std::string& name) const;
+            Output<ngraph::Node> get_ng_node_from_cache(const std::string& name) const;
             const std::string& get_name() const { return m_graph_proto->name(); }
-            NodeVector make_ng_nodes(const Node& onnx_node) const;
+            OutputVector make_ng_nodes(const Node& onnx_node) const;
             const GraphCache& get_graph_cache() const;
 
         protected:
@@ -52,7 +52,8 @@ namespace ngraph
                   Model& model,
                   std::unique_ptr<GraphCache>&& cache);
 
-            void set_friendly_names(const Node& onnx_node, const NodeVector& ng_node_vector) const;
+            void set_friendly_names(const Node& onnx_node,
+                                    const OutputVector& ng_node_vector) const;
 
             void add_provenance_tag_to_initializer(
                 const Tensor& initializer, std::shared_ptr<default_opset::Constant> node) const;
@@ -60,7 +61,8 @@ namespace ngraph
             void add_provenance_tag_to_input(const ValueInfo& input,
                                              std::shared_ptr<ngraph::Node> node) const;
 
-            void add_provenance_tags(const Node& onnx_node, const NodeVector& ng_node_vector) const;
+            void add_provenance_tags(const Node& onnx_node,
+                                     const OutputVector& ng_node_vector) const;
 
         private:
             const ONNX_NAMESPACE::GraphProto* m_graph_proto;
index 0839fc0..28b180a 100644 (file)
@@ -21,12 +21,12 @@ namespace ngraph
 {
     namespace onnx_import
     {
-        void GraphCache::emplace_node(const std::string& name, std::shared_ptr<ngraph::Node>&& node)
+        void GraphCache::emplace_node(const std::string& name, Output<ngraph::Node>&& node)
         {
             m_graph_cache_map[name] = std::move(node);
         }
 
-        std::shared_ptr<ngraph::Node> GraphCache::get_node(const std::string& name) const
+        Output<ngraph::Node> GraphCache::get_node(const std::string& name) const
         {
             try
             {
@@ -52,7 +52,7 @@ namespace ngraph
             }
         }
 
-        std::shared_ptr<ngraph::Node> SubgraphCache::get_node(const std::string& name) const
+        Output<ngraph::Node> SubgraphCache::get_node(const std::string& name) const
         {
             // present in subgraph scope
             if (GraphCache::contains(name))
index 3c5f6ed..cb31f64 100644 (file)
@@ -35,7 +35,7 @@ namespace ngraph
             ///
             /// \param[in]  name       The name of node added to the cache.
             /// \param[in]  node       The node added to the cache.
-            void emplace_node(const std::string& name, std::shared_ptr<ngraph::Node>&& node);
+            void emplace_node(const std::string& name, Output<ngraph::Node>&& node);
 
             /// \brief      Get the node from the cache
             ///
@@ -44,7 +44,7 @@ namespace ngraph
             /// \param[in]  name       The name of the node.
             ///
             /// \return     The node named `name`.
-            virtual std::shared_ptr<ngraph::Node> get_node(const std::string& name) const;
+            virtual Output<ngraph::Node> get_node(const std::string& name) const;
 
             /// \brief      Return true if the node named `name` exist in the cache.
             ///
@@ -54,7 +54,7 @@ namespace ngraph
             virtual bool contains(const std::string& name) const;
 
         private:
-            std::map<std::string, std::shared_ptr<ngraph::Node>> m_graph_cache_map;
+            std::map<std::string, Output<ngraph::Node>> m_graph_cache_map;
         };
 
         class SubgraphCache : public GraphCache
@@ -72,7 +72,7 @@ namespace ngraph
             /// \param[in]  name       The name of the node.
             ///
             /// \return     The node named `name` from subgraph (as present) or from parent graph.
-            std::shared_ptr<ngraph::Node> get_node(const std::string& name) const override;
+            Output<ngraph::Node> get_node(const std::string& name) const override;
 
             /// \brief      Return true if the node named `name` exist in the cache.
             ///
index bba7f29..64ef028 100644 (file)
@@ -40,8 +40,8 @@ namespace ngraph
             }
 
             const std::vector<Attribute>& attributes() const;
-            NodeVector get_ng_nodes(const Node& node) const;
-            NodeVector get_ng_inputs() const;
+            OutputVector get_ng_nodes(const Node& node) const;
+            OutputVector get_ng_inputs() const;
 
             const std::string& domain() const;
             const std::string& op_type() const;
@@ -140,14 +140,14 @@ namespace ngraph
             return it->get_subgraph(graph());
         }
 
-        NodeVector Node::Impl::get_ng_nodes(const Node& node) const
+        OutputVector Node::Impl::get_ng_nodes(const Node& node) const
         {
             return m_graph->make_ng_nodes(node);
         }
 
-        NodeVector Node::Impl::get_ng_inputs() const
+        OutputVector Node::Impl::get_ng_inputs() const
         {
-            NodeVector result;
+            OutputVector result;
             for (const auto& name : m_node_proto->input())
             {
                 if (!name.empty())
@@ -156,7 +156,7 @@ namespace ngraph
                 }
                 else
                 {
-                    result.push_back(std::make_shared<NullNode>());
+                    result.push_back(std::make_shared<NullNode>()->output(0));
                 }
             }
             return result;
@@ -197,8 +197,8 @@ namespace ngraph
         {
         }
 
-        NodeVector Node::get_ng_inputs() const { return m_pimpl->get_ng_inputs(); }
-        NodeVector Node::get_ng_nodes() const { return m_pimpl->get_ng_nodes(*this); }
+        OutputVector Node::get_ng_inputs() const { return m_pimpl->get_ng_inputs(); }
+        OutputVector Node::get_ng_nodes() const { return m_pimpl->get_ng_nodes(*this); }
         const std::string& Node::domain() const { return m_pimpl->domain(); }
         const std::string& Node::op_type() const { return m_pimpl->op_type(); }
         const std::string& Node::get_description() const { return m_pimpl->description(); }
index 7a759ea..a86228c 100644 (file)
@@ -64,8 +64,8 @@ namespace ngraph
             Node& operator=(Node&&) noexcept = delete;
             Node& operator=(const Node&) = delete;
 
-            NodeVector get_ng_inputs() const;
-            NodeVector get_ng_nodes() const;
+            OutputVector get_ng_inputs() const;
+            OutputVector get_ng_nodes() const;
             const std::string& domain() const;
             const std::string& op_type() const;
             const std::string& get_name() const;
index cc150af..e243537 100644 (file)
@@ -42,3 +42,8 @@ bool ngraph::op::is_null(const std::shared_ptr<ngraph::Node>& node)
 {
     return is_null(node.get());
 }
+
+bool ngraph::op::is_null(const Output<ngraph::Node>& output)
+{
+    return is_null(output.get_node());
+}
index 167097e..62f26a3 100644 (file)
@@ -29,6 +29,8 @@ namespace ngraph
         bool is_null(const ngraph::Node* node);
         ONNX_IMPORTER_API
         bool is_null(const std::shared_ptr<ngraph::Node>& node);
+        ONNX_IMPORTER_API
+        bool is_null(const Output<ngraph::Node>& output);
     }
     namespace onnx_import
     {
index c12a998..f98c342 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
     namespace onnx_import
     {
         /// \brief      Function which transforms single ONNX operator to nGraph sub-graph.
-        using Operator = std::function<NodeVector(const Node&)>;
+        using Operator = std::function<OutputVector(const Node&)>;
 
         /// \brief      Map which contains ONNX operators accessible by std::string value as a key.
         using OperatorSet = std::unordered_map<std::string, std::reference_wrapper<const Operator>>;
index 739d5df..8a918f9 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector abs(const Node& node)
+                inline OutputVector abs(const Node& node)
                 {
                     return {std::make_shared<default_opset::Abs>(node.get_ng_inputs().at(0))};
                 }
index 4e76be6..4e17dd2 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector acos(const Node& node)
+                inline OutputVector acos(const Node& node)
                 {
                     return {std::make_shared<default_opset::Acos>(node.get_ng_inputs().at(0))};
                 }
index 77f1e1a..cbe0df6 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector acosh(const Node& node)
+                inline OutputVector acosh(const Node& node)
                 {
                     return {std::make_shared<default_opset::Acosh>(node.get_ng_inputs().at(0))};
                 }
index 57ee17b..4fc947f 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector add(const Node& node)
+                OutputVector add(const Node& node)
                 {
                     const Output<ngraph::Node> lhs_node = node.get_ng_inputs().at(0);
                     Output<ngraph::Node> rhs_node = node.get_ng_inputs().at(1);
@@ -45,7 +45,7 @@ namespace ngraph
 
             namespace set_7
             {
-                NodeVector add(const Node& node)
+                OutputVector add(const Node& node)
                 {
                     return {std::make_shared<default_opset::Add>(node.get_ng_inputs().at(0),
                                                                  node.get_ng_inputs().at(1))};
index 2c613bb..850ae5b 100644 (file)
@@ -29,13 +29,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector add(const Node& node);
+                OutputVector add(const Node& node);
 
             } // namespace set_1
 
             namespace set_7
             {
-                NodeVector add(const Node& node);
+                OutputVector add(const Node& node);
 
             } // namespace set_7
 
index 951eede..c18cae7 100644 (file)
@@ -31,7 +31,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector logical_and(const Node& node)
+                inline OutputVector logical_and(const Node& node)
                 {
                     return {std::make_shared<default_opset::LogicalAnd>(
                         node.get_ng_inputs().at(0), node.get_ng_inputs().at(1))};
index ee743ed..034bf94 100644 (file)
@@ -25,7 +25,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector argmax(const Node& node)
+                OutputVector argmax(const Node& node)
                 {
                     const utils::ArgMinMaxFactory arg_factory(node);
                     return {arg_factory.make_arg_max()};
index 1d28035..0e597a3 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing an Ngraph node which produces the output
                 ///         of an ONNX ArgMax operation.
-                NodeVector argmax(const Node& node);
+                OutputVector argmax(const Node& node);
 
             } // namespace set_1
 
index e45db25..439e2da 100644 (file)
@@ -25,7 +25,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector argmin(const Node& node)
+                OutputVector argmin(const Node& node)
                 {
                     const utils::ArgMinMaxFactory arg_factory(node);
                     return {arg_factory.make_arg_min()};
index 0c967c6..be7c22a 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing an Ngraph node which produces the output
                 ///         of an ONNX ArgMin operation.
-                NodeVector argmin(const Node& node);
+                OutputVector argmin(const Node& node);
 
             } // namespace set_1
 
index 275b73d..f0a7060 100644 (file)
@@ -31,7 +31,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector asin(const Node& node)
+                inline OutputVector asin(const Node& node)
                 {
                     return {std::make_shared<default_opset::Asin>(node.get_ng_inputs().at(0))};
                 }
index 2b4dfaf..5a84581 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector asinh(const Node& node)
+                inline OutputVector asinh(const Node& node)
                 {
                     return {std::make_shared<default_opset::Asinh>(node.get_ng_inputs().at(0))};
                 }
index 2e2b9af..2c4a257 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector atan(const Node& node)
+                inline OutputVector atan(const Node& node)
                 {
                     return {std::make_shared<default_opset::Atan>(node.get_ng_inputs().at(0))};
                 }
index bf604c8..04d4379 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector atanh(const Node& node)
+                inline OutputVector atanh(const Node& node)
                 {
                     return {std::make_shared<default_opset::Atanh>(node.get_ng_inputs().at(0))};
                 }
index 5e764a6..c70ac85 100644 (file)
@@ -26,7 +26,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector average_pool(const Node& node)
+                OutputVector average_pool(const Node& node)
                 {
                     return pooling::LocalPoolingFactory(node).make_avg_pool();
                 }
index ada9e9b..2dcf510 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of ONNX AveragePool
                 ///        operation.
-                NodeVector average_pool(const Node& node);
+                OutputVector average_pool(const Node& node);
 
             } // namespace set_1
 
index 7e5a77f..1933889 100644 (file)
@@ -30,14 +30,14 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector batch_norm(const Node& node)
+                OutputVector batch_norm(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
+                    OutputVector inputs{node.get_ng_inputs()};
                     auto x = inputs.at(0);
                     auto scale = inputs.at(1);
                     auto bias = inputs.at(2);
-                    std::shared_ptr<ngraph::Node> mean{nullptr};
-                    std::shared_ptr<ngraph::Node> var{nullptr};
+                    Output<ngraph::Node> mean;
+                    Output<ngraph::Node> var;
 
                     std::int64_t is_test{node.get_attribute_value<std::int64_t>("is_test", 1)};
                     double epsilon{node.get_attribute_value<double>("epsilon", 1e-5)};
index 2945e95..05469d8 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector batch_norm(const Node& node);
+                OutputVector batch_norm(const Node& node);
 
             } // namespace set_1
 
index a9db841..3b4cf1d 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cast(const Node& node)
+                OutputVector cast(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     int64_t target_type = node.get_attribute_value<int64_t>("to");
index 027f0a4..9a341f5 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cast(const Node& node);
+                OutputVector cast(const Node& node);
 
             } // namespace set_1
 
index d661727..59265d5 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector ceil(const Node& node)
+                inline OutputVector ceil(const Node& node)
                 {
                     return {std::make_shared<default_opset::Ceiling>(node.get_ng_inputs().at(0))};
                 }
index 37f7a3f..c1a2426 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector clip(const Node& node)
+                OutputVector clip(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
 
@@ -47,14 +47,14 @@ namespace ngraph
 
             namespace set_11
             {
-                NodeVector clip(const Node& node)
+                OutputVector clip(const Node& node)
                 {
-                    const NodeVector inputs{node.get_ng_inputs()};
-                    const std::shared_ptr<ngraph::Node> data = inputs.at(0);
-                    const element::Type data_type = data->get_element_type();
-                    const Shape data_shape = data->get_shape();
-                    std::shared_ptr<ngraph::Node> min;
-                    std::shared_ptr<ngraph::Node> max;
+                    const OutputVector inputs{node.get_ng_inputs()};
+                    const Output<ngraph::Node> data = inputs.at(0);
+                    const element::Type data_type = data.get_element_type();
+                    const Shape data_shape = data.get_shape();
+                    Output<ngraph::Node> min;
+                    Output<ngraph::Node> max;
 
                     // If second input is provided, assign to min input, otherwise set lowest
                     // numeric limit of double as min input.
index 79248dc..e34973c 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector clip(const Node& node);
+                OutputVector clip(const Node& node);
 
             } // namespace set_1
 
             namespace set_11
             {
-                NodeVector clip(const Node& node);
+                OutputVector clip(const Node& node);
 
             } // namespace set_11
 
index 9ae8534..e0795d5 100644 (file)
@@ -30,9 +30,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector concat(const Node& node)
+                OutputVector concat(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
+                    OutputVector inputs{node.get_ng_inputs()};
                     std::int64_t axis = node.get_attribute_value<std::int64_t>("axis");
                     return {std::make_shared<default_opset::Concat>(inputs, axis)};
                 }
index 5fda98f..672d38e 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector concat(const Node& node);
+                OutputVector concat(const Node& node);
 
             } // namespace set_1
 
index 27e213d..95efaed 100644 (file)
@@ -153,7 +153,7 @@ namespace ngraph
                     }
                 }
 
-                NodeVector constant(const onnx_import::Node& node)
+                OutputVector constant(const onnx_import::Node& node)
                 {
                     return {make_constant(node.get_attribute_value<Tensor>("value"))};
                 }
index 46acb9c..2e0b148 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector constant(const Node& node);
+                OutputVector constant(const Node& node);
 
             } // namespace set_1
 
index 7ff6b5b..20365c4 100644 (file)
@@ -28,9 +28,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector constant_of_shape(const onnx_import::Node& node)
+                OutputVector constant_of_shape(const onnx_import::Node& node)
                 {
-                    std::shared_ptr<ngraph::Node> constant_value;
+                    Output<ngraph::Node> constant_value;
                     if (node.has_attribute("value"))
                     {
                         auto value_tensor = node.get_attribute_value<Tensor>("value");
index ac92ed9..eed394e 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector constant_of_shape(const Node& node);
+                OutputVector constant_of_shape(const Node& node);
 
             } // namespace set_1
 
index e211fe6..b874279 100644 (file)
@@ -38,8 +38,8 @@ namespace ngraph
                 namespace
                 {
                     std::shared_ptr<ngraph::op::Op>
-                        make_ng_convolution(const std::shared_ptr<ngraph::Node>& data,
-                                            const std::shared_ptr<ngraph::Node>& filters,
+                        make_ng_convolution(const Output<ngraph::Node>& data,
+                                            const Output<ngraph::Node>& filters,
                                             const ngraph::Strides& strides,
                                             const ngraph::Strides& dilations,
                                             const ngraph::CoordinateDiff& padding_below,
@@ -49,7 +49,7 @@ namespace ngraph
                     {
                         if (groups > 1)
                         {
-                            auto filters_shape = filters->get_shape();
+                            auto filters_shape = filters.get_shape();
                             filters_shape.at(0) = filters_shape.at(0) / groups;
                             filters_shape.insert(filters_shape.begin(), groups);
 
@@ -77,18 +77,16 @@ namespace ngraph
                         }
                     }
 
-                    std::shared_ptr<ngraph::Node>
-                        add_bias(const std::shared_ptr<ngraph::Node>& ng_conv,
-                                 const std::shared_ptr<ngraph::Node>& bias)
+                    std::shared_ptr<ngraph::Node> add_bias(const Output<ngraph::Node>& ng_conv,
+                                                           const Output<ngraph::Node>& bias)
                     {
-                        const auto rank_of_conv =
-                            ng_conv->get_output_partial_shape(0).rank().get_length();
+                        const auto rank_of_conv = ng_conv.get_partial_shape().rank().get_length();
 
                         // reshape the bias node {M} to {1, M, 1, 1, ..., 1}
                         // this is required by the addition operation that needs to be able
                         // to broadcast the bias to match the shape of the convolution node
                         std::vector<size_t> reshape_pattern_values(rank_of_conv, 1U);
-                        reshape_pattern_values[1] = bias->get_shape().front();
+                        reshape_pattern_values[1] = bias.get_shape().front();
                         const auto reshape_pattern =
                             default_opset::Constant::create(element::u64,
                                                             Shape{reshape_pattern_values.size()},
@@ -101,16 +99,16 @@ namespace ngraph
                     }
                 } // namespace
 
-                NodeVector conv(const Node& node)
+                OutputVector conv(const Node& node)
                 {
                     // in the current implementation we assume that the data input rank is static
                     // and only the 'batch' dimension can be dynamic
-                    const NodeVector& inputs = node.get_ng_inputs();
+                    const OutputVector& inputs = node.get_ng_inputs();
                     const auto data = inputs.at(0);
                     const auto filters = inputs.at(1);
                     const auto groups = node.get_attribute_value<int64_t>("group", 1);
 
-                    NGRAPH_CHECK(data->get_output_partial_shape(0).rank().is_static(),
+                    NGRAPH_CHECK(data.get_partial_shape().rank().is_static(),
                                  "The input data tensor's rank has to be known (static)");
 
                     const auto strides = convpool::get_strides(node);
@@ -137,7 +135,7 @@ namespace ngraph
                     else
                     {
                         const auto bias = inputs.at(2);
-                        const auto bias_ps = bias->get_output_partial_shape(0);
+                        const auto bias_ps = bias.get_partial_shape();
 
                         NGRAPH_CHECK(bias_ps.is_static() && is_vector(bias_ps.to_shape()),
                                      "The bias input needs to be a static 1D vector");
index 41f90ff..b7c76e6 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of ONNX convolution
                 ///         operation.
-                NodeVector conv(const Node& node);
+                OutputVector conv(const Node& node);
 
             } // namespace set_1
 
index 5d07604..10c5003 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #include "conv_integer.hpp"
 #include "exceptions.hpp"
 #include "ngraph/builder/make_constant.hpp"
@@ -31,9 +34,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector conv_integer(const Node& node)
+                OutputVector conv_integer(const Node& node)
                 {
-                    const NodeVector& inputs = node.get_ng_inputs();
+                    const OutputVector& inputs = node.get_ng_inputs();
                     auto num_inputs = inputs.size();
                     auto input = inputs.at(0);
                     auto filters = inputs.at(1);
@@ -51,19 +54,18 @@ namespace ngraph
                     ngraph::op::PadType auto_pad_type = convpool::get_auto_pad(node);
                     auto& padding_below = paddings.first;
                     auto& padding_above = paddings.second;
-                    convpool::calculate_auto_pads(input->get_shape(),
-                                                  filters->get_shape(),
+                    convpool::calculate_auto_pads(input.get_shape(),
+                                                  filters.get_shape(),
                                                   window_movement_strides,
                                                   window_dilation_strides,
                                                   auto_pad_type,
                                                   padding_below,
                                                   padding_above);
 
-                    const Strides default_data_dilation_strides(input->get_shape().size() - 2, 1);
+                    const Strides default_data_dilation_strides(input.get_shape().size() - 2, 1);
                     auto scale_one = make_constant(ngraph::element::f32, Shape{}, 1);
-                    auto input_zero_point = make_constant(input->get_element_type(), Shape{}, 0);
-                    auto filters_zero_point =
-                        make_constant(filters->get_element_type(), Shape{}, 0);
+                    auto input_zero_point = make_constant(input.get_element_type(), Shape{}, 0);
+                    auto filters_zero_point = make_constant(filters.get_element_type(), Shape{}, 0);
                     auto output_zero_point = make_constant(ngraph::element::i32, Shape{}, 0);
 
                     if (num_inputs == 2)
index ec0354c..41663b5 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #pragma once
 
 #include "core/node.hpp"
@@ -33,7 +36,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of quantized ONNX
                 ///         convolution operation.
-                NodeVector conv_integer(const Node& node);
+                OutputVector conv_integer(const Node& node);
 
             } // namespace set_1
 
index 110e4f2..0c3d6df 100644 (file)
@@ -44,9 +44,9 @@ namespace ngraph
             {
                 namespace
                 {
-                    std::shared_ptr<ngraph::Node>
-                        make_group_conv_backprop(const std::shared_ptr<ngraph::Node>& data,
-                                                 const std::shared_ptr<ngraph::Node>& filters,
+                    Output<ngraph::Node>
+                        make_group_conv_backprop(const Output<ngraph::Node>& data,
+                                                 const Output<ngraph::Node>& filters,
                                                  const Strides& strides,
                                                  const Strides& dilations,
                                                  const CoordinateDiff& pads_begin,
@@ -83,9 +83,9 @@ namespace ngraph
                         }
                     }
 
-                    std::shared_ptr<ngraph::Node>
-                        make_conv_backprop(const std::shared_ptr<ngraph::Node>& data,
-                                           const std::shared_ptr<ngraph::Node>& filters,
+                    Output<ngraph::Node>
+                        make_conv_backprop(const Output<ngraph::Node>& data,
+                                           const Output<ngraph::Node>& filters,
                                            const Strides& strides,
                                            const Strides& dilations,
                                            const CoordinateDiff& pads_begin,
@@ -124,10 +124,9 @@ namespace ngraph
                         }
                     }
 
-                    std::shared_ptr<ngraph::Node>
-                        get_reshaped_filters(const std::shared_ptr<ngraph::Node>& filters,
-                                             const PartialShape& filters_pshape,
-                                             int64_t groups)
+                    Output<ngraph::Node> get_reshaped_filters(const Output<ngraph::Node>& filters,
+                                                              const PartialShape& filters_pshape,
+                                                              int64_t groups)
                     {
                         if (filters_pshape.is_static())
                         {
@@ -180,12 +179,11 @@ namespace ngraph
                         }
                     }
 
-                    std::shared_ptr<ngraph::Node>
-                        get_prepared_bias(const std::shared_ptr<ngraph::Node>& bias,
-                                          const std::shared_ptr<ngraph::Node>& conv)
+                    Output<ngraph::Node> get_prepared_bias(const Output<ngraph::Node>& bias,
+                                                           const Output<ngraph::Node>& conv)
                     {
                         // Prepare bias shape [1, C, 1, 1]
-                        const auto& conv_pshape = conv->get_output_partial_shape(0);
+                        const auto& conv_pshape = conv.get_partial_shape();
                         std::shared_ptr<ngraph::Node> bias_shape_node;
 
                         if (conv_pshape.rank().is_static() && conv_pshape[1].is_static())
@@ -231,9 +229,9 @@ namespace ngraph
                     }
                 }
 
-                NodeVector conv_transpose(const Node& node)
+                OutputVector conv_transpose(const Node& node)
                 {
-                    const NodeVector& inputs = node.get_ng_inputs();
+                    const OutputVector& inputs = node.get_ng_inputs();
 
                     CHECK_VALID_NODE(node,
                                      inputs.size() == 2 || inputs.size() == 3,
@@ -243,8 +241,8 @@ namespace ngraph
                     auto data = inputs[0];
                     auto filters = inputs[1];
 
-                    const auto& data_pshape = data->get_output_partial_shape(0);
-                    const auto& filters_pshape = filters->get_output_partial_shape(0);
+                    const auto& data_pshape = data.get_partial_shape();
+                    const auto& filters_pshape = filters.get_partial_shape();
 
                     std::size_t num_spatial_dims = 0;
                     Strides strides, dilations;
@@ -291,7 +289,7 @@ namespace ngraph
                     CHECK_VALID_NODE(
                         node, groups >= 0, "Incorrect value of 'group' attribute: ", groups);
 
-                    std::shared_ptr<ngraph::Node> conv_node;
+                    Output<ngraph::Node> conv_node;
 
                     // reshape filters to match desired shape:
                     // [GROUPS, C_INPUT, C_OUTPUT, K_D, ..., K_1]
index 9e10d48..1c790f6 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of ONNX convolution
                 ///         operation.
-                NodeVector conv_transpose(const Node& node);
+                OutputVector conv_transpose(const Node& node);
 
             } // namespace set_1
 
index a95cc57..27916d7 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cos(const Node& node)
+                OutputVector cos(const Node& node)
                 {
                     return {std::make_shared<default_opset::Cos>(node.get_ng_inputs().at(0))};
                 }
index d2c116e..4945a62 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cos(const Node& node);
+                OutputVector cos(const Node& node);
             }
         }
 
index bda1ccf..115e0cc 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cosh(const Node& node)
+                OutputVector cosh(const Node& node)
                 {
                     return {std::make_shared<default_opset::Cosh>(node.get_ng_inputs().at(0))};
                 }
index 459bab8..8d5a2a2 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cosh(const Node& node);
+                OutputVector cosh(const Node& node);
             }
         }
     } // namespace onnx_import
index 5bc7ccc..b87a8f2 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cum_sum(const Node& node)
+                OutputVector cum_sum(const Node& node)
                 {
                     auto inputs = node.get_ng_inputs();
                     auto data = inputs.at(0);
                     bool exclusive = node.get_attribute_value<std::int64_t>("exclusive", 0);
                     bool reverse = node.get_attribute_value<std::int64_t>("reverse", 0);
-                    std::shared_ptr<ngraph::Node> axis;
+                    Output<ngraph::Node> axis;
 
                     if (inputs.size() > 1)
                     {
@@ -44,7 +44,7 @@ namespace ngraph
                         axis =
                             default_opset::Constant::create(element::i64, Shape{}, {0}); // default
                     }
-                    return NodeVector{
+                    return OutputVector{
                         std::make_shared<default_opset::CumSum>(data, axis, exclusive, reverse)};
                 }
 
index 63ddcc5..ac6e9cd 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector cum_sum(const Node& node);
+                OutputVector cum_sum(const Node& node);
 
             } // namespace set_1
 
index a4d5aa8..68cffe3 100644 (file)
@@ -25,7 +25,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector depth_to_space(const Node& node)
+                OutputVector depth_to_space(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     const auto mode = node.get_attribute_value<std::string>("mode", "DCR");
@@ -34,7 +34,7 @@ namespace ngraph
                             ? default_opset::DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST
                             : default_opset::DepthToSpace::DepthToSpaceMode::DEPTH_FIRST;
                     const auto block_size = node.get_attribute_value<std::int64_t>("blocksize");
-                    return NodeVector{std::make_shared<default_opset::DepthToSpace>(
+                    return OutputVector{std::make_shared<default_opset::DepthToSpace>(
                         data, ngraph_mode, block_size)};
                 }
             } // namespace set_1
index 68bc2ea..1b949b1 100644 (file)
@@ -34,9 +34,9 @@ namespace ngraph
                 ///
                 /// \param[in]  node  The ONNX input node describing operation.
                 ///
-                /// \return     NodeVector containing Tensor with shape:
+                /// \return     OutputVector containing Tensor with shape:
                 ///             [N, C/(blocksize * blocksize), H * blocksize, W * blocksize]
-                NodeVector depth_to_space(const Node& node);
+                OutputVector depth_to_space(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 29136b7..30e4fef 100644 (file)
@@ -36,13 +36,13 @@ namespace ngraph
         {
             namespace
             {
-                std::shared_ptr<ngraph::Node> get_zero_point(const NodeVector& inputs)
+                Output<ngraph::Node> get_zero_point(const OutputVector& inputs)
                 {
                     if (inputs.size() == 3 && !ngraph::op::is_null(inputs[2]))
                     {
                         auto zero_point = inputs[2];
 
-                        if (zero_point->get_element_type() != element::f32)
+                        if (zero_point.get_element_type() != element::f32)
                         {
                             zero_point =
                                 std::make_shared<default_opset::Convert>(zero_point, element::f32);
@@ -58,9 +58,9 @@ namespace ngraph
             }
             namespace set_1
             {
-                NodeVector dequantize_linear(const Node& node)
+                OutputVector dequantize_linear(const Node& node)
                 {
-                    const NodeVector inputs{node.get_ng_inputs()};
+                    const OutputVector inputs{node.get_ng_inputs()};
 
                     NGRAPH_CHECK(
                         2 <= inputs.size() && inputs.size() <= 3,
@@ -71,8 +71,9 @@ namespace ngraph
                     const auto scale = inputs[1];
                     const auto zero_point = get_zero_point(inputs);
 
-                    common::validate_scalar_input("Dequantization scale", scale, {element::f32});
-                    common::validate_scalar_input("Zero point", zero_point);
+                    common::validate_scalar_input(
+                        "Dequantization scale", scale.get_node_shared_ptr(), {element::f32});
+                    common::validate_scalar_input("Zero point", zero_point.get_node_shared_ptr());
 
                     const auto converted_x =
                         std::make_shared<default_opset::Convert>(x, element::f32);
@@ -86,11 +87,11 @@ namespace ngraph
             {
                 namespace
                 {
-                    void validate_scale(const std::shared_ptr<ngraph::Node> scale,
-                                        const std::shared_ptr<ngraph::Node> x,
+                    void validate_scale(const Output<ngraph::Node> scale,
+                                        const Output<ngraph::Node> x,
                                         const int64_t axis)
                     {
-                        const auto& scale_shape = scale->get_output_partial_shape(0);
+                        const auto& scale_shape = scale.get_partial_shape();
                         NGRAPH_CHECK(scale_shape.rank().get_length() == 0 ||
                                          scale_shape.rank().get_length() == 1,
                                      "Dequantization scale needs to be a scalar or a vector.");
@@ -98,7 +99,7 @@ namespace ngraph
                         if (scale_shape.rank().get_length() == 1)
                         {
                             const auto& scale_dim = scale_shape[0];
-                            const auto& x_shape = x->get_output_partial_shape(0);
+                            const auto& x_shape = x.get_partial_shape();
                             const auto& x_dim_at_axis = x_shape[axis];
 
                             NGRAPH_CHECK(scale_dim.same_scheme(x_dim_at_axis),
@@ -111,11 +112,11 @@ namespace ngraph
                         }
                     }
 
-                    void validate_zero_point(const std::shared_ptr<ngraph::Node> zero_point,
-                                             const std::shared_ptr<ngraph::Node> x,
+                    void validate_zero_point(const Output<ngraph::Node> zero_point,
+                                             const Output<ngraph::Node> x,
                                              const int64_t axis)
                     {
-                        const auto& zero_point_shape = zero_point->get_output_partial_shape(0);
+                        const auto& zero_point_shape = zero_point.get_partial_shape();
                         NGRAPH_CHECK(zero_point_shape.rank().get_length() == 0 ||
                                          zero_point_shape.rank().get_length() == 1,
                                      "Zero point needs to be a scalar or a vector.");
@@ -123,7 +124,7 @@ namespace ngraph
                         if (zero_point_shape.rank().get_length() == 1)
                         {
                             const auto& zero_point_dim = zero_point_shape[0];
-                            const auto& x_shape = x->get_output_partial_shape(0);
+                            const auto& x_shape = x.get_partial_shape();
                             const auto& x_dim_at_axis = x_shape[axis];
 
                             NGRAPH_CHECK(zero_point_dim.same_scheme(x_dim_at_axis),
@@ -136,10 +137,9 @@ namespace ngraph
                         }
                     }
 
-                    std::shared_ptr<ngraph::Node>
-                        reshape_input(const std::shared_ptr<ngraph::Node> input,
-                                      const int64_t axis,
-                                      const PartialShape& x_shape)
+                    std::shared_ptr<ngraph::Node> reshape_input(const Output<ngraph::Node> input,
+                                                                const int64_t axis,
+                                                                const PartialShape& x_shape)
                     {
                         std::vector<int64_t> target_dims;
 
@@ -170,9 +170,9 @@ namespace ngraph
                     }
                 }
 
-                NodeVector dequantize_linear(const Node& node)
+                OutputVector dequantize_linear(const Node& node)
                 {
-                    const NodeVector inputs{node.get_ng_inputs()};
+                    const OutputVector inputs{node.get_ng_inputs()};
 
                     NGRAPH_CHECK(2 <= inputs.size() && inputs.size() <= 3,
                                  "The DequantizeLinear op expects 2 required and one optional "
@@ -183,7 +183,7 @@ namespace ngraph
                     auto scale = inputs[1];
                     auto zero_point = get_zero_point(inputs);
 
-                    const auto x_shape = x->get_output_partial_shape(0);
+                    const auto x_shape = x.get_partial_shape();
 
                     NGRAPH_CHECK(x_shape.rank().is_static(),
                                  "Rank of the input data tensor has to be known (static).");
index dc67093..1b06f67 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector dequantize_linear(const Node& node);
+                OutputVector dequantize_linear(const Node& node);
 
             } // namespace set_1
 
             namespace set_13
             {
-                NodeVector dequantize_linear(const Node& node);
+                OutputVector dequantize_linear(const Node& node);
             }
 
         } // namespace op
index 31f10b0..bc04a29 100644 (file)
@@ -32,7 +32,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector div(const Node& node)
+                inline OutputVector div(const Node& node)
                 {
                     const Output<ngraph::Node> lhs_node = node.get_ng_inputs().at(0);
                     Output<ngraph::Node> rhs_node = node.get_ng_inputs().at(1);
@@ -50,7 +50,7 @@ namespace ngraph
 
             namespace set_7
             {
-                inline NodeVector div(const Node& node)
+                inline OutputVector div(const Node& node)
                 {
                     return {std::make_shared<default_opset::Divide>(node.get_ng_inputs().at(0),
                                                                     node.get_ng_inputs().at(1))};
index 7f62516..d9f5f43 100644 (file)
@@ -30,11 +30,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector dropout(const Node& node)
+                inline OutputVector dropout(const Node& node)
                 {
                     // First value is actual output of Dropout,
                     // the second one is just a placeholder for optional trailing output.
-                    return {node.get_ng_inputs().at(0), std::make_shared<NullNode>()};
+                    return {node.get_ng_inputs().at(0).get_node_shared_ptr(),
+                            std::make_shared<NullNode>()};
                 }
             } // namespace set_1
 
index c242f52..801ca87 100644 (file)
@@ -28,12 +28,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector elu(const Node& node)
+                OutputVector elu(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     double alpha = node.get_attribute_value<double>("alpha", 1);
 
-                    return NodeVector{std::make_shared<default_opset::Elu>(data, alpha)};
+                    return OutputVector{std::make_shared<default_opset::Elu>(data, alpha)};
                 }
 
             } // namespace set_1
index 3d78a80..c4d4485 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector elu(const Node& node);
+                OutputVector elu(const Node& node);
 
             } // namespace set_1
 
index 0736fc0..480cc58 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector equal(const Node& node)
+                inline OutputVector equal(const Node& node)
                 {
                     return {std::make_shared<default_opset::Equal>(node.get_ng_inputs().at(0),
                                                                    node.get_ng_inputs().at(1))};
index c36adcf..8a2698c 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector erf(const Node& node)
+                inline OutputVector erf(const Node& node)
                 {
                     return {std::make_shared<default_opset::Erf>(node.get_ng_inputs().at(0))};
                 }
index e24b9cc..78b82f3 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector exp(const Node& node)
+                inline OutputVector exp(const Node& node)
                 {
                     return {std::make_shared<default_opset::Exp>(node.get_ng_inputs().at(0))};
                 }
index f20c957..4d6911d 100644 (file)
@@ -30,10 +30,10 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector expand(const Node& node)
+                OutputVector expand(const Node& node)
                 {
-                    const std::shared_ptr<ngraph::Node> data{node.get_ng_inputs().at(0)};
-                    const std::shared_ptr<ngraph::Node> shape{node.get_ng_inputs().at(1)};
+                    const Output<ngraph::Node> data{node.get_ng_inputs().at(0)};
+                    const Output<ngraph::Node> shape{node.get_ng_inputs().at(1)};
 
                     return {std::make_shared<default_opset::Broadcast>(
                         data, shape, ngraph::op::BroadcastType::BIDIRECTIONAL)};
index 40f67e3..280b0fb 100644 (file)
@@ -29,7 +29,7 @@ namespace ngraph
             // Expand operator has been available since version 8 of the default ONNX operator set.
             // Currently, Expand is assigned to version 1 due to temporary reason.
             {
-                NodeVector expand(const Node& node);
+                OutputVector expand(const Node& node);
 
             } // namespace set_1
 
index 3cbde4a..6ba0c75 100644 (file)
@@ -28,10 +28,10 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector eye_like(const Node& node)
+                OutputVector eye_like(const Node& node)
                 {
                     const auto input = node.get_ng_inputs().at(0);
-                    const auto& input_shape = input->get_shape();
+                    const auto& input_shape = input.get_shape();
 
                     std::int64_t dtype;
                     element::Type target_type;
@@ -44,7 +44,7 @@ namespace ngraph
                     }
                     else
                     {
-                        target_type = input->get_element_type();
+                        target_type = input.get_element_type();
                     }
 
                     CHECK_VALID_NODE(node,
index 2464640..e4711ab 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector eye_like(const Node& node);
+                OutputVector eye_like(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 0f5c1a4..a97f7af 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector fake_quantize(const onnx_import::Node& node)
+                OutputVector fake_quantize(const onnx_import::Node& node)
                 {
                     const auto inputs = node.get_ng_inputs();
                     const auto X = inputs.at(0);
index 4f5ea81..8452f0d 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector fake_quantize(const Node& node);
+                OutputVector fake_quantize(const Node& node);
 
             } // namespace set_1
 
index 4d19145..990b37a 100644 (file)
@@ -29,12 +29,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector flatten(const Node& node)
+                OutputVector flatten(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
+                    OutputVector inputs{node.get_ng_inputs()};
                     auto data = inputs.at(0);
                     auto axis = node.get_attribute_value<std::int64_t>("axis", 1);
-                    const auto data_rank = data->get_output_partial_shape(0).rank();
+                    const auto data_rank = data.get_partial_shape().rank();
 
                     if (data_rank.is_static())
                     {
index 8971cd2..fc2d3ef 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector flatten(const Node& node);
+                OutputVector flatten(const Node& node);
 
             } // namespace set_1
 
index 5dd4774..a24dd44 100644 (file)
@@ -31,7 +31,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector floor(const Node& node)
+                inline OutputVector floor(const Node& node)
                 {
                     return {std::make_shared<default_opset::Floor>(node.get_ng_inputs().at(0))};
                 }
index 899fe28..c700b28 100644 (file)
@@ -31,14 +31,14 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector gather(const Node& node)
+                inline OutputVector gather(const Node& node)
                 {
-                    NodeVector ng_inputs{node.get_ng_inputs()};
+                    OutputVector ng_inputs{node.get_ng_inputs()};
                     auto data = ng_inputs.at(0);
                     auto indices = ng_inputs.at(1);
                     auto axis = node.get_attribute_value<int64_t>("axis", 0);
                     const auto valid_axis = ngraph::normalize_axis(
-                        node.get_description(), axis, data->get_output_partial_shape(0).rank());
+                        node.get_description(), axis, data.get_partial_shape().rank());
 
                     return {std::make_shared<default_opset::Gather>(
                         data,
index ca7842a..30089f5 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #include "ngraph/opsets/opset0.hpp"
 #include "utils/common.hpp"
 
@@ -25,9 +28,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector gather_nd(const Node& node)
+                OutputVector gather_nd(const Node& node)
                 {
-                    NodeVector ng_inputs{node.get_ng_inputs()};
+                    OutputVector ng_inputs{node.get_ng_inputs()};
                     auto data = ng_inputs.at(0);
                     auto indices = ng_inputs.at(1);
 
index 1a15e59..435550b 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #pragma once
 
 #include "core/node.hpp"
@@ -27,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector gather_nd(const Node& node);
+                OutputVector gather_nd(const Node& node);
 
             } // namespace set_1
 
index 4772bf3..9650a5a 100644 (file)
@@ -32,12 +32,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector gemm(const Node& node)
+                OutputVector gemm(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
-                    std::shared_ptr<ngraph::Node> input_a = inputs.at(0);
-                    std::shared_ptr<ngraph::Node> input_b = inputs.at(1);
-                    std::shared_ptr<ngraph::Node> input_c;
+                    OutputVector inputs{node.get_ng_inputs()};
+                    Output<ngraph::Node> input_a = inputs.at(0);
+                    Output<ngraph::Node> input_b = inputs.at(1);
+                    Output<ngraph::Node> input_c;
 
                     if (inputs.size() == 3)
                     {
@@ -46,16 +46,16 @@ namespace ngraph
                     else
                     {
                         input_c = default_opset::Constant::create(
-                            input_b->get_element_type(), ngraph::Shape{}, {0});
+                            input_b.get_element_type(), ngraph::Shape{}, {0});
                     }
 
                     const auto alpha = node.get_attribute_value<float>("alpha", 1);
                     const auto beta = node.get_attribute_value<float>("beta", 1);
 
                     const auto alpha_node = default_opset::Constant::create(
-                        input_b->get_element_type(), Shape{}, {alpha});
+                        input_b.get_element_type(), Shape{}, {alpha});
                     const auto beta_node = default_opset::Constant::create(
-                        input_c->get_element_type(), Shape{}, {beta});
+                        input_c.get_element_type(), Shape{}, {beta});
 
                     const bool trans_a = node.get_attribute_value<int64_t>("transA", 0);
                     const bool trans_b = node.get_attribute_value<int64_t>("transB", 0);
@@ -85,7 +85,7 @@ namespace ngraph
                     auto beta_times_input_c =
                         std::make_shared<default_opset::Multiply>(beta_node, input_c);
 
-                    return NodeVector{
+                    return OutputVector{
                         std::make_shared<default_opset::Add>(matmul_node, beta_times_input_c)};
                 }
 
@@ -93,12 +93,12 @@ namespace ngraph
 
             namespace set_6
             {
-                NodeVector gemm(const Node& node)
+                OutputVector gemm(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
-                    std::shared_ptr<ngraph::Node> input_a = inputs.at(0);
-                    std::shared_ptr<ngraph::Node> input_b = inputs.at(1);
-                    std::shared_ptr<ngraph::Node> input_c;
+                    OutputVector inputs{node.get_ng_inputs()};
+                    Output<ngraph::Node> input_a = inputs.at(0);
+                    Output<ngraph::Node> input_b = inputs.at(1);
+                    Output<ngraph::Node> input_c;
 
                     if (inputs.size() == 3)
                     {
@@ -107,16 +107,16 @@ namespace ngraph
                     else
                     {
                         input_c = default_opset::Constant::create(
-                            input_b->get_element_type(), ngraph::Shape{}, {0});
+                            input_b.get_element_type(), ngraph::Shape{}, {0});
                     }
 
                     const auto alpha = node.get_attribute_value<float>("alpha", 1);
                     const auto beta = node.get_attribute_value<float>("beta", 1);
 
                     const auto alpha_node = default_opset::Constant::create(
-                        input_b->get_element_type(), Shape{}, {alpha});
+                        input_b.get_element_type(), Shape{}, {alpha});
                     const auto beta_node = default_opset::Constant::create(
-                        input_c->get_element_type(), Shape{}, {beta});
+                        input_c.get_element_type(), Shape{}, {beta});
 
                     const bool trans_a = node.get_attribute_value<int64_t>("transA", 0);
                     const bool trans_b = node.get_attribute_value<int64_t>("transB", 0);
@@ -133,7 +133,7 @@ namespace ngraph
                     auto beta_times_input_c =
                         std::make_shared<default_opset::Multiply>(beta_node, input_c);
 
-                    return NodeVector{
+                    return OutputVector{
                         std::make_shared<default_opset::Add>(matmul_node, beta_times_input_c)};
                 }
 
index 158bf6f..b2a019b 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector gemm(const Node& node);
+                OutputVector gemm(const Node& node);
 
             } // namespace set_1
 
             namespace set_6
             {
-                NodeVector gemm(const Node& node);
+                OutputVector gemm(const Node& node);
 
             } // namespace set_6
 
index bd13efe..b5aad2e 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector global_average_pool(const Node& node)
+                OutputVector global_average_pool(const Node& node)
                 {
                     return pooling::GlobalPoolingFactory(node).make_avg_pool();
                 }
index c6c2de8..29c54d2 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of ONNX
                 ///         GlobalAveragePool operation.
-                NodeVector global_average_pool(const Node& node);
+                OutputVector global_average_pool(const Node& node);
 
             } // namespace set_1
 
index 1f50b4e..6b984dd 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector global_max_pool(const Node& node)
+                OutputVector global_max_pool(const Node& node)
                 {
                     return pooling::GlobalPoolingFactory(node).make_max_pool();
                 }
index e67cefd..827a77b 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of ONNX
                 ///         GlobalMaxPool operation.
-                NodeVector global_max_pool(const Node& node);
+                OutputVector global_max_pool(const Node& node);
 
             } // namespace set_1
 
index ea0f189..15e64cf 100644 (file)
@@ -31,7 +31,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector greater(const Node& node)
+                inline OutputVector greater(const Node& node)
                 {
                     return {std::make_shared<default_opset::Greater>(node.get_ng_inputs().at(0),
                                                                      node.get_ng_inputs().at(1))};
index 33ef6ca..42bd6f3 100644 (file)
@@ -46,7 +46,7 @@ namespace ngraph
                             if (linear_before_reset)
                             {
                                 const auto& ng_inputs = node.get_ng_inputs();
-                                const auto el_type = ng_inputs.at(0)->get_output_element_type(0);
+                                const auto el_type = ng_inputs.at(0).get_element_type();
 
                                 if (ng_inputs.size() > 3 && !ngraph::op::is_null(ng_inputs.at(3)))
                                 {
@@ -68,18 +68,18 @@ namespace ngraph
                                     //       ]
                                     m_map[recurrent::OpInput::B] =
                                         std::make_shared<default_opset::Concat>(
-                                            NodeVector{wr_z_bias,
-                                                       wr_r_bias,
-                                                       split_bias.at(2),
-                                                       split_bias.at(5)},
+                                            OutputVector{wr_z_bias,
+                                                         wr_r_bias,
+                                                         split_bias.at(2),
+                                                         split_bias.at(5)},
                                             1);
                                 }
                                 else
                                 {
                                     const std::size_t hidden_size =
-                                        m_map[recurrent::OpInput::R]->get_shape().back();
+                                        m_map[recurrent::OpInput::R].get_shape().back();
                                     const std::size_t num_directions =
-                                        m_map[recurrent::OpInput::W]->get_shape().front();
+                                        m_map[recurrent::OpInput::W].get_shape().front();
 
                                     m_map[recurrent::OpInput::B] =
                                         std::make_shared<default_opset::Constant>(
@@ -110,7 +110,7 @@ namespace ngraph
                     };
                 }
 
-                NodeVector gru(const Node& node)
+                OutputVector gru(const Node& node)
                 {
                     constexpr std::size_t gates_count = 3;
                     GRUInputMap input_map{node, gates_count};
index 347a034..16f75d6 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector gru(const Node& node);
+                OutputVector gru(const Node& node);
 
             } // namespace set_1
 
index a55f675..19f2feb 100644 (file)
@@ -27,17 +27,17 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector hard_sigmoid(const Node& node)
+                OutputVector hard_sigmoid(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
 
                     const auto alpha = default_opset::Constant::create<double>(
-                        data->get_element_type(),
+                        data.get_element_type(),
                         Shape{},
                         std::vector<double>{node.get_attribute_value<double>("alpha", 0.2)});
 
                     const auto beta = default_opset::Constant::create<double>(
-                        data->get_element_type(),
+                        data.get_element_type(),
                         Shape{},
                         std::vector<double>{node.get_attribute_value<double>("beta", 0.5)});
 
index 1ba6bc0..2d2809d 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector hard_sigmoid(const Node& node);
+                OutputVector hard_sigmoid(const Node& node);
 
             } // namespace set_1
 
index 0ef0d4d..a53959b 100644 (file)
@@ -31,10 +31,10 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector hardmax(const Node& node)
+                OutputVector hardmax(const Node& node)
                 {
                     const auto input = node.get_ng_inputs().at(0);
-                    const auto& input_shape = input->get_output_partial_shape(0);
+                    const auto& input_shape = input.get_partial_shape();
 
                     auto axis = node.get_attribute_value<std::int64_t>("axis", 1);
                     if (input_shape.rank().is_static())
@@ -48,11 +48,10 @@ namespace ngraph
 
                     const auto coerced_tensor_shape =
                         std::make_shared<default_opset::ShapeOf>(coerced_tensor);
-                    std::shared_ptr<ngraph::Node> row_size =
-                        std::make_shared<default_opset::Gather>(
-                            coerced_tensor_shape,
-                            default_opset::Constant::create(element::i64, {1}, {1}),
-                            default_opset::Constant::create(element::i64, {}, {0}));
+                    Output<ngraph::Node> row_size = std::make_shared<default_opset::Gather>(
+                        coerced_tensor_shape,
+                        default_opset::Constant::create(element::i64, {1}, {1}),
+                        default_opset::Constant::create(element::i64, {}, {0}));
                     row_size = ngraph::onnx_import::reshape::interpret_as_scalar(row_size);
 
                     const auto indices_axis = 1;
@@ -70,8 +69,8 @@ namespace ngraph
 
                     const auto results = std::make_shared<default_opset::OneHot>(
                         topk->output(1), row_size, on_value, off_value, indices_axis);
-                    const auto converted_results = std::make_shared<default_opset::Convert>(
-                        results, input->get_element_type());
+                    const auto converted_results =
+                        std::make_shared<default_opset::Convert>(results, input.get_element_type());
 
                     if (input_shape.is_static())
                     {
index aa2b1ff..15aacb7 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector hardmax(const Node& node);
+                OutputVector hardmax(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 104ff41..c6f7420 100644 (file)
@@ -30,17 +30,17 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector identity(const Node& node)
+                inline OutputVector identity(const Node& node)
                 {
                     auto input = node.get_ng_inputs().at(0);
-                    if (input->get_element_type() == ngraph::element::boolean)
+                    if (input.get_element_type() == ngraph::element::boolean)
                     {
                         const auto logic_zero =
                             default_opset::Constant::create(ngraph::element::boolean, {}, {false});
                         return {std::make_shared<default_opset::LogicalOr>(input, logic_zero)};
                     }
                     const auto zero =
-                        default_opset::Constant::create(input->get_element_type(), {}, {0});
+                        default_opset::Constant::create(input.get_element_type(), {}, {0});
                     return {std::make_shared<default_opset::Add>(input, zero)};
                 }
             } // namespace set_1
index 8043000..73aeac2 100644 (file)
@@ -25,14 +25,14 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector image_scaler(const Node& node)
+                OutputVector image_scaler(const Node& node)
                 {
                     const auto inputs = node.get_ng_inputs();
                     NGRAPH_CHECK(
                         inputs.size() == 1, "ImageScaler 1 input tensor. Got: ", inputs.size());
 
                     const auto data = inputs[0];
-                    const auto& data_shape = data->get_output_partial_shape(0);
+                    const auto& data_shape = data.get_partial_shape();
                     NGRAPH_CHECK(data_shape.rank().same_scheme({4}),
                                  "ImageScaler expects a 4D tensor with NCHW format. Got: ",
                                  data_shape);
index 7f5a088..47043ea 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector image_scaler(const Node& node);
+                OutputVector image_scaler(const Node& node);
             }
         }
     }
index 3dff291..6ce81f7 100644 (file)
@@ -39,7 +39,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector instance_norm(const Node& node)
+                OutputVector instance_norm(const Node& node)
                 {
                     Output<ngraph::Node> data(node.get_ng_inputs().at(0));
                     Output<ngraph::Node> scale(node.get_ng_inputs().at(1));
index e4e4953..f826bf4 100644 (file)
@@ -38,7 +38,7 @@ namespace ngraph
                 ///
                 /// \return     Vector of nodes containting resulting nGraph nodes.
                 ///
-                NodeVector instance_norm(const Node& node);
+                OutputVector instance_norm(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 30a08fa..1650d19 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector leaky_relu(const Node& node)
+                OutputVector leaky_relu(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     double alpha = node.get_attribute_value<double>("alpha", 0.01);
@@ -37,7 +37,7 @@ namespace ngraph
                         node, alpha >= 0 && alpha <= 1, " alpha value should be in range (0,1)");
 
                     std::shared_ptr<ngraph::Node> alpha_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {alpha});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {alpha});
                     return {std::make_shared<default_opset::PRelu>(data, alpha_node)};
                 }
 
index 0a89de9..9fce5c7 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector leaky_relu(const Node& node);
+                OutputVector leaky_relu(const Node& node);
 
             } // namespace set_1
 
index 41de017..16900f7 100644 (file)
@@ -31,7 +31,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector less(const Node& node)
+                inline OutputVector less(const Node& node)
                 {
                     return {std::make_shared<default_opset::Less>(node.get_ng_inputs().at(0),
                                                                   node.get_ng_inputs().at(1))};
index d407394..c38c02a 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector log(const Node& node)
+                OutputVector log(const Node& node)
                 {
                     return {std::make_shared<default_opset::Log>(node.get_ng_inputs().at(0))};
                 }
index 735beed..2b49fae 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector log(const Node& node);
+                OutputVector log(const Node& node);
             }
         }
 
index 03f9c0e..ed7049e 100644 (file)
@@ -28,11 +28,11 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector log_softmax(const Node& node)
+                OutputVector log_softmax(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
+                    OutputVector inputs{node.get_ng_inputs()};
                     const auto data = inputs.at(0);
-                    const auto data_rank = data->get_output_partial_shape(0).rank();
+                    const auto data_rank = data.get_partial_shape().rank();
 
                     const auto axis = node.get_attribute_value<int64_t>("axis", 1);
                     const auto normalized_axis =
index f0e0aee..59c64c1 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector log_softmax(const Node& node);
+                OutputVector log_softmax(const Node& node);
 
             } // namespace set_1
 
index bcfc20d..80b3f87 100644 (file)
@@ -49,15 +49,15 @@ namespace ngraph
                     ///
                     /// \return true if termination condition is true and it cannot be changed
                     ///         during Loop iterations, false otherwise.
-                    bool is_termination_condition_always_true(
-                        const std::shared_ptr<ngraph::Node>& loop_cond,
-                        const std::shared_ptr<ngraph::Node>& body_cond)
+                    bool is_termination_condition_always_true(const Output<ngraph::Node>& loop_cond,
+                                                              const Output<ngraph::Node>& body_cond)
                     {
                         bool loop_cond_value = false;
-                        if (ngraph::op::is_constant(loop_cond) &&
-                            loop_cond->get_element_type() == element::boolean)
+                        if (ngraph::op::is_constant(loop_cond.get_node()) &&
+                            loop_cond.get_element_type() == element::boolean)
                         {
-                            loop_cond_value = as_type_ptr<default_opset::Constant>(loop_cond)
+                            loop_cond_value = as_type_ptr<default_opset::Constant>(
+                                                  loop_cond.get_node_shared_ptr())
                                                   ->cast_vector<bool>()
                                                   .at(0);
                         }
@@ -75,10 +75,11 @@ namespace ngraph
                         // value of loop_cond - true
                         // Identity op for boolean value is represented by LogicalOr op whose second
                         // input is always false
-                        if (is_type<default_opset::LogicalOr>(body_cond))
+                        if (is_type<default_opset::LogicalOr>(body_cond.get_node_shared_ptr()))
                         {
-                            const auto second_input =
-                                body_cond->input_value(1).get_node_shared_ptr();
+                            const auto second_input = body_cond.get_node_shared_ptr()
+                                                          ->input_value(1)
+                                                          .get_node_shared_ptr();
                             if (ngraph::op::is_constant(second_input) &&
                                 second_input->get_element_type() == element::boolean &&
                                 as_type_ptr<default_opset::Constant>(second_input)
@@ -92,12 +93,12 @@ namespace ngraph
                     }
                 }
 
-                NodeVector loop(const Node& node)
+                OutputVector loop(const Node& node)
                 {
                     const auto& ng_inputs = node.get_ng_inputs();
                     // optional inputs
-                    const std::shared_ptr<ngraph::Node> trip_count = ng_inputs.at(0);
-                    const std::shared_ptr<ngraph::Node> loop_cond = ng_inputs.at(1);
+                    const Output<ngraph::Node> trip_count = ng_inputs.at(0);
+                    const Output<ngraph::Node> loop_cond = ng_inputs.at(1);
 
                     // At this moment nGraph TensorIterator doesn't have support for conditional
                     // termination of iterations.
@@ -110,8 +111,7 @@ namespace ngraph
 
                     // required
                     const Subgraph& body_graph{node.get_attribute_value<Subgraph>("body")};
-                    const auto& graph_outputs =
-                        ngraph::as_output_vector(body_graph.get_ng_outputs());
+                    const auto& graph_outputs = body_graph.get_ng_outputs();
                     const auto& graph_inputs = body_graph.get_ng_parameters();
 
                     CHECK_VALID_NODE(
@@ -152,10 +152,10 @@ namespace ngraph
                     // input.
                     const auto loop_trip_count = std::make_shared<default_opset::Range>(
                         default_opset::Constant::create(
-                            trip_count->get_element_type(), Shape{}, {0}),
+                            trip_count.get_element_type(), Shape{}, {0}),
                         ngraph::onnx_import::reshape::interpret_as_scalar(trip_count),
                         default_opset::Constant::create(
-                            trip_count->get_element_type(), Shape{}, {1}));
+                            trip_count.get_element_type(), Shape{}, {1}));
 
                     // We iterate over trip_count input.
                     // start=0, stride=1, part_size=1, end=-1, axis=0
@@ -190,7 +190,7 @@ namespace ngraph
                             *graph_outputs_it, 0, 1, 1, -1, 0));
                     }
 
-                    NodeVector node_outputs;
+                    OutputVector node_outputs;
                     for (const auto& v : final_values)
                     {
                         node_outputs.push_back(v.as_single_output_node());
index 16b5f29..4126906 100644 (file)
@@ -36,7 +36,7 @@ namespace ngraph
                 ///
                 /// \return     Vector of nodes containting resulting nGraph nodes.
                 ///
-                NodeVector loop(const Node& node);
+                OutputVector loop(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 3d8eaa7..bb68adc 100644 (file)
@@ -36,10 +36,10 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector lp_norm(const Node& node)
+                OutputVector lp_norm(const Node& node)
                 {
-                    const std::shared_ptr<ngraph::Node> data{node.get_ng_inputs().at(0)};
-                    const auto data_shape = data->get_output_partial_shape(0);
+                    const Output<ngraph::Node> data{node.get_ng_inputs().at(0)};
+                    const auto data_shape = data.get_partial_shape();
                     const auto data_rank = data_shape.rank();
 
                     CHECK_VALID_NODE(
index 9a18008..94e41ab 100644 (file)
@@ -39,7 +39,7 @@ namespace ngraph
                 ///
                 /// \return     Vector of nodes containting resulting nGraph nodes.
                 ///
-                NodeVector lp_norm(const Node& node);
+                OutputVector lp_norm(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 319491d..c9471b0 100644 (file)
@@ -35,12 +35,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector global_lp_pool(const Node& node)
+                OutputVector global_lp_pool(const Node& node)
                 {
-                    const std::shared_ptr<ngraph::Node> data{node.get_ng_inputs().at(0)};
+                    const Output<ngraph::Node> data{node.get_ng_inputs().at(0)};
                     const std::size_t channel_axis{1};
 
-                    const auto data_shape = data->get_output_partial_shape(0);
+                    const auto data_shape = data.get_partial_shape();
                     NGRAPH_CHECK(data_shape.rank().is_static(),
                                  "Rank of input data must be static");
                     NGRAPH_CHECK(data_shape.rank().get_length() >= 2,
@@ -58,7 +58,7 @@ namespace ngraph
                         p_norm >= 0,
                         "Only positive (including zero) values are supported for 'p' attribute.");
 
-                    NodeVector slices =
+                    OutputVector slices =
                         ngraph::builder::opset1::split(data, channels_count, channel_axis);
 
                     for (auto& slice : slices)
index 46ca82e..330ae71 100644 (file)
@@ -44,7 +44,7 @@ namespace ngraph
                 ///
                 /// \return     Vector of nodes containting resulting nGraph nodes.
                 ///
-                NodeVector global_lp_pool(const Node& node);
+                OutputVector global_lp_pool(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 52cac5f..688b95c 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector lrn(const Node& node)
+                OutputVector lrn(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     double alpha = node.get_attribute_value<double>("alpha", 1e-4);
index 2708479..05e146a 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector lrn(const Node& node);
+                OutputVector lrn(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 1892e10..4466564 100644 (file)
@@ -61,7 +61,7 @@ namespace ngraph
 
                 struct LSTMNgInputMap
                 {
-                    using container_type = std::map<LSTMInput, std::shared_ptr<ngraph::Node>>;
+                    using container_type = std::map<LSTMInput, Output<ngraph::Node>>;
                     using iterator = typename container_type::iterator;
 
                     explicit LSTMNgInputMap(const Node& node)
@@ -84,11 +84,11 @@ namespace ngraph
                         m_map[LSTMInput::LSTM_INPUT_R] = ng_inputs.at(2);
 
                         const std::size_t hidden_size =
-                            m_map[LSTMInput::LSTM_INPUT_R]->get_shape().back();
+                            m_map[LSTMInput::LSTM_INPUT_R].get_shape().back();
                         const std::size_t batch_size =
-                            m_map[LSTMInput::LSTM_INPUT_X]->get_shape().at(0);
+                            m_map[LSTMInput::LSTM_INPUT_X].get_shape().at(0);
                         const std::size_t num_directions =
-                            m_map[LSTMInput::LSTM_INPUT_W]->get_shape().front();
+                            m_map[LSTMInput::LSTM_INPUT_W].get_shape().front();
 
                         // ------ Optional inputs ------
                         // The bias tensor for input gate. Shape [num_directions, 4*hidden_size]
@@ -119,7 +119,7 @@ namespace ngraph
                                     Shape{batch_size},
                                     std::vector<std::int32_t>(
                                         batch_size,
-                                        m_map[LSTMInput::LSTM_INPUT_X]->get_shape().at(1)));
+                                        m_map[LSTMInput::LSTM_INPUT_X].get_shape().at(1)));
                         }
                         // The initial value of the hidden.
                         // Shape [num_directions, batch_size, hidden_size]
@@ -164,10 +164,7 @@ namespace ngraph
                         }
                     }
 
-                    std::shared_ptr<ngraph::Node>& at(const LSTMInput& key)
-                    {
-                        return m_map.at(key);
-                    }
+                    Output<ngraph::Node>& at(const LSTMInput& key) { return m_map.at(key); }
                     container_type m_map;
                 };
 
@@ -209,7 +206,7 @@ namespace ngraph
 
             namespace set_1
             {
-                NodeVector lstm(const Node& node)
+                OutputVector lstm(const Node& node)
                 {
                     LSTMNgInputMap input_map{node};
                     LSTMAttributes attributes{node};
index 8667602..eb79c98 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector lstm(const Node& node);
+                OutputVector lstm(const Node& node);
 
             } // namespace set_1
 
index 60d1f32..77dfdd6 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector matmul(const Node& node)
+                OutputVector matmul(const Node& node)
                 {
                     return {std::make_shared<default_opset::MatMul>(node.get_ng_inputs().at(0),
                                                                     node.get_ng_inputs().at(1))};
index 47caabf..9722744 100644 (file)
@@ -26,13 +26,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector matmul_integer(const Node& node)
+                OutputVector matmul_integer(const Node& node)
                 {
                     auto ng_inputs = node.get_ng_inputs();
                     auto factory = builder::MatmulIntegerFactory(
                         OutputVector(std::begin(ng_inputs), std::end(ng_inputs)));
-                    std::size_t left_rank{ng_inputs.at(0)->get_shape().size()};
-                    std::size_t right_rank{ng_inputs.at(1)->get_shape().size()};
+                    std::size_t left_rank{ng_inputs.at(0).get_shape().size()};
+                    std::size_t right_rank{ng_inputs.at(1).get_shape().size()};
 
                     if (left_rank == 0 || right_rank == 0)
                     {
index 84af81d..5452377 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of quantized ONNX
                 ///         matrix multiplication operation.
-                NodeVector matmul_integer(const Node& node);
+                OutputVector matmul_integer(const Node& node);
 
             } // namespace set_1
 
index ab7b974..33ac5c9 100644 (file)
@@ -29,7 +29,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector max(const Node& node)
+                inline OutputVector max(const Node& node)
                 {
                     return variadic::make_ng_variadic_op<default_opset::Maximum>(
                         node, ngraph::op::AutoBroadcastSpec::NONE);
@@ -39,7 +39,7 @@ namespace ngraph
 
             namespace set_8
             {
-                inline NodeVector max(const Node& node)
+                inline OutputVector max(const Node& node)
                 {
                     return variadic::make_ng_variadic_op<default_opset::Maximum>(node);
                 }
index 8ccfe7f..2640f2a 100644 (file)
@@ -29,7 +29,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector max_pool(const Node& node)
+                OutputVector max_pool(const Node& node)
                 {
                     auto max_pool = pooling::LocalPoolingFactory(node).make_max_pool();
                     max_pool.emplace_back(std::make_shared<NullNode>()); // Indices (optional)
index 5ff5068..3dfed12 100644 (file)
@@ -35,7 +35,7 @@ namespace ngraph
                 /// \return The vector containing Ngraph nodes producing output of ONNX MaxPool
                 ///         operation.
                 ///
-                NodeVector max_pool(const Node& node);
+                OutputVector max_pool(const Node& node);
 
             } // namespace set_1
 
index c02af4b..552a34d 100644 (file)
@@ -26,11 +26,11 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector mean(const Node& node)
+                OutputVector mean(const Node& node)
                 {
                     auto sum = variadic::make_ng_variadic_op<default_opset::Add>(node).front();
                     auto count = default_opset::Constant::create(
-                        sum->get_element_type(), Shape{}, {node.get_ng_inputs().size()});
+                        sum.get_element_type(), Shape{}, {node.get_ng_inputs().size()});
 
                     return {std::make_shared<default_opset::Divide>(sum, count)};
                 }
index 955324e..a37888d 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector mean(const Node& node);
+                OutputVector mean(const Node& node);
 
             } // namespace set_1
 
index 4eb6011..66fe1c6 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector mean_variance_normalization(const Node& node)
+                OutputVector mean_variance_normalization(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     bool across_channels =
@@ -46,12 +46,12 @@ namespace ngraph
 
             namespace set_9
             {
-                NodeVector mean_variance_normalization(const Node& node)
+                OutputVector mean_variance_normalization(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     auto axes = node.get_attribute_value<std::vector<int64_t>>("axes", {0, 2, 3});
                     const std::vector<std::size_t> normalized_axes = ngraph::normalize_axes(
-                        node.get_description(), axes, data->get_output_partial_shape(0).rank());
+                        node.get_description(), axes, data.get_partial_shape().rank());
 
                     return {std::make_shared<default_opset::MVN>(data, AxisSet(normalized_axes))};
                 }
index 46de1f2..6be70c8 100644 (file)
@@ -27,12 +27,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector mean_variance_normalization(const Node& node);
+                OutputVector mean_variance_normalization(const Node& node);
             } // namespace set_1
 
             namespace set_9
             {
-                NodeVector mean_variance_normalization(const Node& node);
+                OutputVector mean_variance_normalization(const Node& node);
             } // namespace set_9
 
         } // namespace op
index 1d38cd2..42af053 100644 (file)
@@ -29,7 +29,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector min(const Node& node)
+                inline OutputVector min(const Node& node)
                 {
                     return variadic::make_ng_variadic_op<default_opset::Minimum>(
                         node, ngraph::op::AutoBroadcastSpec::NONE);
@@ -39,7 +39,7 @@ namespace ngraph
 
             namespace set_8
             {
-                inline NodeVector min(const Node& node)
+                inline OutputVector min(const Node& node)
                 {
                     return variadic::make_ng_variadic_op<default_opset::Minimum>(node);
                 }
index 492af78..63fec77 100644 (file)
@@ -31,10 +31,10 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector mod(const Node& node)
+                OutputVector mod(const Node& node)
                 {
-                    std::shared_ptr<ngraph::Node> dividend{node.get_ng_inputs().at(0)};
-                    std::shared_ptr<ngraph::Node> divisor{node.get_ng_inputs().at(1)};
+                    Output<ngraph::Node> dividend{node.get_ng_inputs().at(0)};
+                    Output<ngraph::Node> divisor{node.get_ng_inputs().at(1)};
 
                     std::int64_t fmod = node.get_attribute_value<std::int64_t>("fmod", 0);
                     CHECK_VALID_NODE(
index 3a97446..5496406 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector mod(const Node& node);
+                OutputVector mod(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 0b418c2..77b5012 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector mul(const Node& node)
+                inline OutputVector mul(const Node& node)
                 {
                     const Output<ngraph::Node> lhs_node = node.get_ng_inputs().at(0);
                     Output<ngraph::Node> rhs_node = node.get_ng_inputs().at(1);
@@ -51,7 +51,7 @@ namespace ngraph
 
             namespace set_7
             {
-                inline NodeVector mul(const Node& node)
+                inline OutputVector mul(const Node& node)
                 {
                     return {std::make_shared<default_opset::Multiply>(node.get_ng_inputs().at(0),
                                                                       node.get_ng_inputs().at(1))};
index 572cdfc..e55f730 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector neg(const Node& node) { return {-node.get_ng_inputs().at(0)}; }
+                inline OutputVector neg(const Node& node) { return {-node.get_ng_inputs().at(0)}; }
             } // namespace set_1
 
         } // namespace op
index 1563807..ead2a3b 100644 (file)
@@ -31,16 +31,16 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector non_max_suppression(const Node& node)
+                OutputVector non_max_suppression(const Node& node)
                 {
                     // TODO: this op will not be tested until at least
                     //       a reference implementation is added
 
                     const auto ng_inputs = node.get_ng_inputs();
-                    const std::shared_ptr<ngraph::Node> boxes = ng_inputs.at(0);
-                    const std::shared_ptr<ngraph::Node> scores = ng_inputs.at(1);
+                    const Output<ngraph::Node> boxes = ng_inputs.at(0);
+                    const Output<ngraph::Node> scores = ng_inputs.at(1);
 
-                    std::shared_ptr<ngraph::Node> max_output_boxes_per_class;
+                    Output<ngraph::Node> max_output_boxes_per_class;
                     if (ng_inputs.size() > 2)
                     {
                         max_output_boxes_per_class =
@@ -52,7 +52,7 @@ namespace ngraph
                             default_opset::Constant::create(element::i64, Shape{}, {0});
                     }
 
-                    std::shared_ptr<ngraph::Node> iou_threshold;
+                    Output<ngraph::Node> iou_threshold;
                     if (ng_inputs.size() > 3)
                     {
                         iou_threshold =
@@ -64,7 +64,7 @@ namespace ngraph
                             default_opset::Constant::create(element::f32, Shape{}, {.0f});
                     }
 
-                    std::shared_ptr<ngraph::Node> score_threshold;
+                    Output<ngraph::Node> score_threshold;
                     if (ng_inputs.size() > 4)
                     {
                         score_threshold =
index 709809f..72a96a9 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector non_max_suppression(const Node& node);
+                OutputVector non_max_suppression(const Node& node);
             } // namespace set_1
 
         } // namespace op
index dd03f2c..56f029c 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector non_zero(const Node& node)
+                OutputVector non_zero(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
                     return {std::make_shared<default_opset::NonZero>(data, element::i64)};
index ee7bff6..a30bba2 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing nGraph nodes producing output of ONNX NonZero
                 ///         operation.
-                NodeVector non_zero(const Node& node);
+                OutputVector non_zero(const Node& node);
 
             } // namespace set_1
 
index 9b53df9..390086e 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector logical_not(const Node& node)
+                inline OutputVector logical_not(const Node& node)
                 {
                     return {
                         std::make_shared<default_opset::LogicalNot>(node.get_ng_inputs().at(0))};
index 5e728b2..cb0dbac 100644 (file)
@@ -29,9 +29,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector onehot(const Node& node)
+                OutputVector onehot(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
+                    OutputVector inputs{node.get_ng_inputs()};
                     auto indices =
                         std::make_shared<default_opset::Convert>(inputs.at(0), element::i64);
                     auto depth = reshape::interpret_as_scalar(inputs.at(1));
index a557e0e..a246fe5 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector onehot(const Node& node);
+                OutputVector onehot(const Node& node);
 
             } // namespace set_1
 
index 47f15a9..f0896a7 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector logical_or(const Node& node)
+                inline OutputVector logical_or(const Node& node)
                 {
                     return {std::make_shared<default_opset::LogicalOr>(node.get_ng_inputs().at(0),
                                                                        node.get_ng_inputs().at(1))};
index 6e7c509..998aab6 100644 (file)
@@ -62,12 +62,11 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector pad(const Node& node)
+                OutputVector pad(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
 
-                    const auto data_rank =
-                        node.get_ng_inputs().at(0)->get_output_partial_shape(0).rank();
+                    const auto data_rank = node.get_ng_inputs().at(0).get_partial_shape().rank();
                     CHECK_VALID_NODE(
                         node, data_rank.is_static(), "Data rank must be static for pad op");
                     const auto data_rank_value = data_rank.get_length();
@@ -88,20 +87,20 @@ namespace ngraph
                         std::make_shared<default_opset::Constant>(
                             element::i64, ngraph::Shape{padding_above.size()}, padding_above),
                         std::make_shared<default_opset::Constant>(
-                            data->get_element_type(), ngraph::Shape{}, std::vector<double>{value}),
+                            data.get_element_type(), ngraph::Shape{}, std::vector<double>{value}),
                         pad_mode)};
                 }
 
             } // namespace set_1
             namespace set_11
             {
-                NodeVector pad(const Node& node)
+                OutputVector pad(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     auto pads = node.get_ng_inputs().at(1);
-                    std::shared_ptr<ngraph::Node> values;
-                    std::shared_ptr<ngraph::Node> padding_begin;
-                    std::shared_ptr<ngraph::Node> padding_end;
+                    Output<ngraph::Node> values;
+                    Output<ngraph::Node> padding_begin;
+                    Output<ngraph::Node> padding_end;
 
                     if (node.get_ng_inputs().size() == 3)
                     {
@@ -110,13 +109,13 @@ namespace ngraph
                     else
                     {
                         values = default_opset::Constant::create(
-                            data->get_element_type(), ngraph::Shape{}, {0});
+                            data.get_element_type(), ngraph::Shape{}, {0});
                     }
 
-                    if (ngraph::op::is_constant(pads))
+                    if (ngraph::op::is_constant(pads.get_node()))
                     {
                         std::vector<std::int64_t> pads_vector =
-                            ngraph::as_type_ptr<default_opset::Constant>(pads)
+                            ngraph::as_type_ptr<default_opset::Constant>(pads.get_node_shared_ptr())
                                 ->get_vector<std::int64_t>();
 
                         std::size_t const half_size = pads_vector.size() / 2;
@@ -134,7 +133,7 @@ namespace ngraph
                     {
                         auto axis =
                             default_opset::Constant::create(element::i64, ngraph::Shape{}, {0});
-                        NodeVector padding = builder::opset1::split(pads, 2, 0);
+                        OutputVector padding = builder::opset1::split(pads, 2, 0);
 
                         padding_begin =
                             std::make_shared<default_opset::Convert>(padding.at(0), element::i64);
index 8e54ac0..b35ff2a 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector pad(const Node& node);
+                OutputVector pad(const Node& node);
 
             } // namespace set_1
 
             namespace set_11
             {
-                NodeVector pad(const Node& node);
+                OutputVector pad(const Node& node);
 
             } // namespace set_11
 
index c36955c..0003081 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector pow(const Node& node)
+                inline OutputVector pow(const Node& node)
                 {
                     return {std::make_shared<default_opset::Power>(node.get_ng_inputs().at(0),
                                                                    node.get_ng_inputs().at(1))};
index 58c3f65..4295a6b 100644 (file)
@@ -27,9 +27,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector prelu(const Node& node)
+                OutputVector prelu(const Node& node)
                 {
-                    NodeVector ng_inputs{node.get_ng_inputs()};
+                    OutputVector ng_inputs{node.get_ng_inputs()};
                     const auto& data = ng_inputs.at(0);
                     const auto& slope = ng_inputs.at(1);
                     return {std::make_shared<default_opset::PRelu>(data, slope)};
index a708b77..8137547 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector prelu(const Node& node);
+                OutputVector prelu(const Node& node);
 
             } // namespace set_1
 
index d256ac1..6ef58c1 100644 (file)
@@ -26,13 +26,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector qlinear_matmul(const Node& node)
+                OutputVector qlinear_matmul(const Node& node)
                 {
                     auto ng_inputs = node.get_ng_inputs();
                     auto factory = builder::QLinearMatmulFactory(
                         (OutputVector(std::begin(ng_inputs), std::end(ng_inputs))));
-                    std::size_t left_rank{ng_inputs.at(0)->get_shape().size()};
-                    std::size_t right_rank{ng_inputs.at(1)->get_shape().size()};
+                    std::size_t left_rank{ng_inputs.at(0).get_shape().size()};
+                    std::size_t right_rank{ng_inputs.at(1).get_shape().size()};
 
                     if (left_rank == 0 || right_rank == 0)
                     {
index bb5ec13..cc2e423 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector qlinear_matmul(const Node& node);
+                OutputVector qlinear_matmul(const Node& node);
             } // namespace set_1
 
         } // namespace op
index fe16635..ac993d2 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #include <cstddef>
 #include <memory>
 #include <vector>
@@ -40,21 +43,21 @@ namespace ngraph
                 {
                     struct OpScale
                     {
-                        std::shared_ptr<ngraph::Node> data_scale;
-                        std::shared_ptr<ngraph::Node> filter_scale;
-                        std::shared_ptr<ngraph::Node> output_scale;
+                        Output<ngraph::Node> data_scale;
+                        Output<ngraph::Node> filter_scale;
+                        Output<ngraph::Node> output_scale;
                     };
 
                     struct OpZeroPoint
                     {
-                        std::shared_ptr<ngraph::Node> data_zero_point;
-                        std::shared_ptr<ngraph::Node> filter_zero_point;
-                        std::shared_ptr<ngraph::Node> output_zero_point;
+                        Output<ngraph::Node> data_zero_point;
+                        Output<ngraph::Node> filter_zero_point;
+                        Output<ngraph::Node> output_zero_point;
                     };
 
                     std::shared_ptr<ngraph::Node>
-                        make_ng_quant_conv(const std::shared_ptr<ngraph::Node>& data,
-                                           const std::shared_ptr<ngraph::Node>& filters,
+                        make_ng_quant_conv(const Output<ngraph::Node>& data,
+                                           const Output<ngraph::Node>& filters,
                                            const Strides& strides,
                                            const Strides& filter_dilations,
                                            const CoordinateDiff& padding_below,
@@ -63,16 +66,16 @@ namespace ngraph
                                            int groups,
                                            const OpScale& op_scale,
                                            const OpZeroPoint& op_zero_point,
-                                           const std::shared_ptr<ngraph::Node>& bias = nullptr)
+                                           const Output<ngraph::Node>& bias = nullptr)
                     {
                         ngraph::element::Type output_type;
-                        if (data->get_element_type() == ngraph::element::u8 &&
-                            filters->get_element_type() == ngraph::element::i8)
+                        if (data.get_element_type() == ngraph::element::u8 &&
+                            filters.get_element_type() == ngraph::element::i8)
                         {
                             output_type = ngraph::element::i8;
                         }
-                        else if (data->get_element_type() == ngraph::element::u8 &&
-                                 filters->get_element_type() == ngraph::element::u8)
+                        else if (data.get_element_type() == ngraph::element::u8 &&
+                                 filters.get_element_type() == ngraph::element::u8)
                         {
                             output_type = ngraph::element::u8;
                         }
@@ -80,19 +83,19 @@ namespace ngraph
                         {
                             // Split one convolution op to N ops where N is the number of groups
                             // and concat results after computation.
-                            std::size_t n_data_channels{data->get_shape().at(1)};
-                            std::size_t n_filters_channels{filters->get_shape().at(0)};
+                            std::size_t n_data_channels{data.get_shape().at(1)};
+                            std::size_t n_filters_channels{filters.get_shape().at(0)};
 
                             std::size_t data_group_size{n_data_channels / groups};
                             std::size_t filters_group_size{n_filters_channels / groups};
-                            NodeVector convolution_nodes;
+                            OutputVector convolution_nodes;
 
                             // initial bounds for splice
-                            std::vector<std::size_t> data_lower_bounds(data->get_shape().size());
-                            std::vector<std::size_t> data_upper_bounds{data->get_shape()};
+                            std::vector<std::size_t> data_lower_bounds(data.get_shape().size());
+                            std::vector<std::size_t> data_upper_bounds{data.get_shape()};
                             std::vector<std::size_t> filters_lower_bounds(
                                 filters->get_shape().size());
-                            std::vector<std::size_t> filters_upper_bounds{filters->get_shape()};
+                            std::vector<std::size_t> filters_upper_bounds{filters.get_shape()};
 
                             for (int64_t group{0}; group < groups; ++group)
                             {
@@ -107,7 +110,7 @@ namespace ngraph
                                 auto sliced_filters = std::make_shared<ngraph::opset0::Slice>(
                                     filters, filters_lower_bounds, filters_upper_bounds);
 
-                                if (bias)
+                                if (bias.get_node())
                                 {
                                     throw ngraph_error(
                                         "Groups != 1 not supported for Quantized Convolution with "
@@ -142,7 +145,7 @@ namespace ngraph
                         }
                         else
                         {
-                            if (bias)
+                            if (bias.get_node())
                             {
                                 return ngraph::builder::quantization::
                                     QuantizedLinearConvolutionBias(data,
@@ -183,9 +186,9 @@ namespace ngraph
 
                 } // namespace
 
-                NodeVector quant_conv(const Node& node)
+                OutputVector quant_conv(const Node& node)
                 {
-                    const NodeVector& inputs = node.get_ng_inputs();
+                    const OutputVector& inputs = node.get_ng_inputs();
                     auto data = inputs.at(0);
                     auto filters = inputs.at(3);
 
@@ -200,13 +203,13 @@ namespace ngraph
 
                     CHECK_VALID_NODE(node,
                                      ((groups >= 0) &&
-                                      (groups <= static_cast<int64_t>(data->get_shape().at(1))) &&
-                                      (groups <= static_cast<int64_t>(filters->get_shape().at(0)))),
+                                      (groups <= static_cast<int64_t>(data.get_shape().at(1))) &&
+                                      (groups <= static_cast<int64_t>(filters.get_shape().at(0)))),
                                      "incorrect value of 'group' attribute: ",
                                      groups);
 
-                    std::size_t n_data_channels{data->get_shape().at(1)};
-                    std::size_t n_filters_channels{filters->get_shape().at(0)};
+                    std::size_t n_data_channels{data.get_shape().at(1)};
+                    std::size_t n_filters_channels{filters.get_shape().at(0)};
 
                     CHECK_VALID_NODE(
                         node,
@@ -226,8 +229,8 @@ namespace ngraph
                     ngraph::op::PadType auto_pad_type = convpool::get_auto_pad(node);
                     CoordinateDiff& padding_below = paddings.first;
                     CoordinateDiff& padding_above = paddings.second;
-                    convpool::calculate_auto_pads(data->get_shape(),
-                                                  filters->get_shape(),
+                    convpool::calculate_auto_pads(data.get_shape(),
+                                                  filters.get_shape(),
                                                   strides,
                                                   filter_dilations,
                                                   auto_pad_type,
@@ -237,7 +240,7 @@ namespace ngraph
                     std::shared_ptr<ngraph::Node> conv_node = nullptr;
 
                     // no bias param
-                    if (inputs.size() == 9 && !inputs.at(8)->is_null())
+                    if (inputs.size() == 9 && !ngraph::op::is_null(inputs.at(8)))
                     {
                         auto bias = inputs.at(8);
                         conv_node = make_ng_quant_conv(
index 8a9360a..61e22fe 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #pragma once
 
 #include "core/node.hpp"
@@ -33,7 +36,7 @@ namespace ngraph
                 ///
                 /// \return The vector containing Ngraph nodes producing output of ONNX quantizied
                 ///         convolution operation.
-                NodeVector quant_conv(const Node& node);
+                OutputVector quant_conv(const Node& node);
 
             } // namespace set_1
 
index 418e6ef..ba586a6 100644 (file)
@@ -39,11 +39,11 @@ namespace ngraph
             {
                 namespace
                 {
-                    std::shared_ptr<ngraph::Node> get_zero_point(const NodeVector& inputs)
+                    std::shared_ptr<ngraph::Node> get_zero_point(const OutputVector& inputs)
                     {
                         if (inputs.size() > 2)
                         {
-                            return inputs.at(2);
+                            return inputs.at(2).get_node_shared_ptr();
                         }
                         else
                         {
@@ -171,11 +171,11 @@ namespace ngraph
 
             namespace set_1
             {
-                NodeVector quantize_linear(const Node& node)
+                OutputVector quantize_linear(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
-                    auto x = inputs.at(0);
-                    auto y_scale = inputs.at(1);
+                    OutputVector inputs{node.get_ng_inputs()};
+                    auto x = inputs.at(0).get_node_shared_ptr();
+                    auto y_scale = inputs.at(1).get_node_shared_ptr();
                     auto y_zero_point = detail::get_zero_point(inputs);
 
                     x = detail::validate_data(node, x);
@@ -188,11 +188,11 @@ namespace ngraph
 
             namespace set_13
             {
-                NodeVector quantize_linear(const Node& node)
+                OutputVector quantize_linear(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
-                    auto x = inputs.at(0);
-                    auto y_scale = inputs.at(1);
+                    OutputVector inputs{node.get_ng_inputs()};
+                    auto x = inputs.at(0).get_node_shared_ptr();
+                    auto y_scale = inputs.at(1).get_node_shared_ptr();
                     auto y_zero_point = detail::get_zero_point(inputs);
 
                     x = detail::validate_data(node, x);
index b549c74..fe74fe3 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector quantize_linear(const Node& node);
+                OutputVector quantize_linear(const Node& node);
 
             } // namespace set_1
 
             namespace set_13
             {
-                NodeVector quantize_linear(const Node& node);
+                OutputVector quantize_linear(const Node& node);
 
             } // namespace set_13
 
index ebe2b11..8139b16 100644 (file)
@@ -27,11 +27,11 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector range(const Node& node)
+                OutputVector range(const Node& node)
                 {
-                    const std::shared_ptr<ngraph::Node> start{node.get_ng_inputs().at(0)};
-                    const std::shared_ptr<ngraph::Node> stop{node.get_ng_inputs().at(1)};
-                    const std::shared_ptr<ngraph::Node> step{node.get_ng_inputs().at(2)};
+                    const Output<ngraph::Node> start{node.get_ng_inputs().at(0)};
+                    const Output<ngraph::Node> stop{node.get_ng_inputs().at(1)};
+                    const Output<ngraph::Node> step{node.get_ng_inputs().at(2)};
                     return {std::make_shared<default_opset::Range>(start, stop, step)};
                 }
             } // namespace set_1
index 95f9e93..fddbe53 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector range(const Node& node);
+                OutputVector range(const Node& node);
 
             } // namespace set_1
 
index 411ef9f..c4fdd0b 100644 (file)
@@ -28,12 +28,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector reciprocal(const Node& node)
+                OutputVector reciprocal(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
 
                     auto one_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {1});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {1});
                     return {std::make_shared<default_opset::Divide>(one_node, data)};
                 }
 
index 6a27725..5a7f14e 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector reciprocal(const Node& node);
+                OutputVector reciprocal(const Node& node);
 
             } // namespace set_1
 
index bacc0f8..0c5c789 100644 (file)
@@ -31,35 +31,35 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector reduce_log_sum(const Node& node)
+                OutputVector reduce_log_sum(const Node& node)
                 {
-                    std::shared_ptr<ngraph::Node> sum_node{reduction::make_ng_reduction_op(
+                    Output<ngraph::Node> sum_node{reduction::make_ng_reduction_op(
                         node,
                         node.get_ng_inputs().at(0),
                         std::make_shared<default_opset::ReduceSum,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                     return {std::make_shared<default_opset::Log>(sum_node)};
                 }
 
-                NodeVector reduce_log_sum_exp(const Node& node)
+                OutputVector reduce_log_sum_exp(const Node& node)
                 {
                     auto exp_node =
                         std::make_shared<default_opset::Exp>(node.get_ng_inputs().at(0));
-                    std::shared_ptr<ngraph::Node> sum_node{reduction::make_ng_reduction_op(
+                    Output<ngraph::Node> sum_node{reduction::make_ng_reduction_op(
                         node,
                         exp_node,
                         std::make_shared<default_opset::ReduceSum,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                     return {std::make_shared<default_opset::Log>(sum_node)};
                 }
 
-                NodeVector reduce_l1(const Node& node)
+                OutputVector reduce_l1(const Node& node)
                 {
-                    auto l1_norm_reduction = [](const std::shared_ptr<ngraph::Node>& node,
+                    auto l1_norm_reduction = [](const Output<ngraph::Node>& node,
                                                 const ngraph::AxisSet& axis_set) {
                         const auto axis_set_const = default_opset::Constant::create(
                             element::i64, {axis_set.size()}, axis_set.to_vector());
@@ -70,9 +70,9 @@ namespace ngraph
                         node, node.get_ng_inputs().at(0), l1_norm_reduction)};
                 }
 
-                NodeVector reduce_l2(const Node& node)
+                OutputVector reduce_l2(const Node& node)
                 {
-                    auto l2_norm_reduction = [](const std::shared_ptr<ngraph::Node>& node,
+                    auto l2_norm_reduction = [](const Output<ngraph::Node>& node,
                                                 const ngraph::AxisSet& axis_set) {
                         const auto axis_set_const = default_opset::Constant::create(
                             element::i64, {axis_set.size()}, axis_set.to_vector());
@@ -83,71 +83,71 @@ namespace ngraph
                         node, node.get_ng_inputs().at(0), l2_norm_reduction)};
                 }
 
-                NodeVector reduce_max(const Node& node)
+                OutputVector reduce_max(const Node& node)
                 {
                     return {reduction::make_ng_reduction_op(
                         node,
                         node.get_ng_inputs().at(0),
                         std::make_shared<default_opset::ReduceMax,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                 }
 
-                NodeVector reduce_mean(const Node& node)
+                OutputVector reduce_mean(const Node& node)
                 {
                     return {reduction::make_ng_reduction_op(
                         node,
                         node.get_ng_inputs().at(0),
                         std::make_shared<default_opset::ReduceMean,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                 }
 
-                NodeVector reduce_min(const Node& node)
+                OutputVector reduce_min(const Node& node)
                 {
                     return {reduction::make_ng_reduction_op(
                         node,
                         node.get_ng_inputs().at(0),
                         std::make_shared<default_opset::ReduceMin,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                 }
 
-                NodeVector reduce_prod(const Node& node)
+                OutputVector reduce_prod(const Node& node)
                 {
                     return {reduction::make_ng_reduction_op(
                         node,
                         node.get_ng_inputs().at(0),
                         std::make_shared<default_opset::ReduceProd,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                 }
 
-                NodeVector reduce_sum(const Node& node)
+                OutputVector reduce_sum(const Node& node)
                 {
                     return {reduction::make_ng_reduction_op(
                         node,
                         node.get_ng_inputs().at(0),
                         std::make_shared<default_opset::ReduceSum,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                 }
 
-                NodeVector reduce_sum_square(const Node& node)
+                OutputVector reduce_sum_square(const Node& node)
                 {
-                    auto input = std::shared_ptr<ngraph::Node>{node.get_ng_inputs().at(0)};
+                    auto input = Output<ngraph::Node>{node.get_ng_inputs().at(0)};
                     auto square_node = std::make_shared<default_opset::Multiply>(input, input);
                     return {reduction::make_ng_reduction_op(
                         node,
                         square_node,
                         std::make_shared<default_opset::ReduceSum,
-                                         const std::shared_ptr<ngraph::Node>&,
-                                         const std::shared_ptr<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
+                                         const Output<ngraph::Node>&,
                                          bool>)};
                 }
 
index 05a87b3..bebcdfc 100644 (file)
@@ -38,7 +38,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_log_sum(const Node& node);
+                OutputVector reduce_log_sum(const Node& node);
 
                 /// \brief      Compute the log sum exponent of the input tensor's elements along
                 ///             the provided axes.
@@ -52,7 +52,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_log_sum_exp(const Node& node);
+                OutputVector reduce_log_sum_exp(const Node& node);
 
                 /// \brief      Compute the L1 norm of the input tensor's element along the provided
                 ///             axes.
@@ -66,7 +66,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_l1(const Node& node);
+                OutputVector reduce_l1(const Node& node);
 
                 /// \brief      Compute the L2 norm of the input tensor's element along the provided
                 ///             axes.
@@ -80,7 +80,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_l2(const Node& node);
+                OutputVector reduce_l2(const Node& node);
 
                 /// \brief      Compute the maximum value of the input tensor's elements along the
                 ///             provided axes.
@@ -94,7 +94,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_max(const Node& node);
+                OutputVector reduce_max(const Node& node);
 
                 /// \brief      Compute the mean value of the input tensor's elements along the
                 ///             provided axes.
@@ -108,7 +108,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_mean(const Node& node);
+                OutputVector reduce_mean(const Node& node);
 
                 /// \brief      Compute the minimum value of the input tensor's elements along the
                 ///             provided axes.
@@ -122,7 +122,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_min(const Node& node);
+                OutputVector reduce_min(const Node& node);
 
                 /// \brief      Compute the product of the input tensor's elements along the
                 ///             provided axes.
@@ -136,7 +136,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_prod(const Node& node);
+                OutputVector reduce_prod(const Node& node);
 
                 /// \brief      Compute the sum of the input tensor's elements along the provided
                 ///             axes.
@@ -150,7 +150,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_sum(const Node& node);
+                OutputVector reduce_sum(const Node& node);
 
                 /// \brief      Compute the sum square of the input tensor's element along the
                 ///             provided axes.
@@ -164,7 +164,7 @@ namespace ngraph
                 ///
                 /// \return     The nGraph node equivalent of the ONNX operation.
                 ///
-                NodeVector reduce_sum_square(const Node& node);
+                OutputVector reduce_sum_square(const Node& node);
 
             } // namespace set_1
 
index a5a6078..0ad3426 100644 (file)
@@ -30,9 +30,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector relu(const Node& node)
+                inline OutputVector relu(const Node& node)
                 {
-                    NodeVector ng_inputs{node.get_ng_inputs()};
+                    OutputVector ng_inputs{node.get_ng_inputs()};
                     return {std::make_shared<default_opset::Relu>(ng_inputs.at(0))};
                 }
 
index 9bf5510..5f6bbd2 100644 (file)
@@ -33,12 +33,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector reshape(const Node& node)
+                OutputVector reshape(const Node& node)
                 {
-                    NodeVector ng_inputs{node.get_ng_inputs()};
+                    OutputVector ng_inputs{node.get_ng_inputs()};
                     const auto data = ng_inputs.at(0);
 
-                    std::shared_ptr<ngraph::Node> pattern;
+                    Output<ngraph::Node> pattern;
 
                     // Since opset 5 the target shape is provided as input
                     if (ng_inputs.size() == 2)
index a61e61c..472cc57 100644 (file)
@@ -34,7 +34,7 @@ namespace ngraph
                 ///
                 /// \return     Ngraph node representing this operation.
                 ///
-                NodeVector reshape(const Node& node);
+                OutputVector reshape(const Node& node);
 
             } // namespace set_1
 
index e07ef5e..d112153 100644 (file)
@@ -28,17 +28,17 @@ namespace ngraph
         {
             namespace
             {
-                std::shared_ptr<ngraph::Node> calculate_output_shape_based_on_scales(
-                    const std::shared_ptr<ngraph::Node>& data,
-                    const std::shared_ptr<ngraph::Node>& scales)
+                std::shared_ptr<ngraph::Node>
+                    calculate_output_shape_based_on_scales(const Output<ngraph::Node>& data,
+                                                           const Output<ngraph::Node>& scales)
                 {
-                    const auto& data_shape = data->get_output_partial_shape(0);
-                    const auto& scales_shape = scales->get_output_partial_shape(0);
+                    const auto& data_shape = data.get_partial_shape();
+                    const auto& scales_shape = scales.get_partial_shape();
 
-                    if (ngraph::op::is_constant(scales) && data_shape.is_static())
+                    if (ngraph::op::is_constant(scales.get_node()) && data_shape.is_static())
                     {
                         const auto scales_const =
-                            as_type_ptr<default_opset::Constant>(scales->shared_from_this());
+                            as_type_ptr<default_opset::Constant>(scales.get_node_shared_ptr());
 
                         const auto scales_vector = scales_const->cast_vector<float>();
                         const auto data_static_shape = data_shape.to_shape();
@@ -56,7 +56,7 @@ namespace ngraph
                     }
 
                     const auto shape_of_data = std::make_shared<default_opset::Convert>(
-                        std::make_shared<default_opset::ShapeOf>(data), scales->get_element_type());
+                        std::make_shared<default_opset::ShapeOf>(data), scales.get_element_type());
                     const auto multiply =
                         std::make_shared<default_opset::Multiply>(shape_of_data, scales);
                     const auto output_shape =
@@ -65,9 +65,9 @@ namespace ngraph
                     return output_shape;
                 }
 
-                NodeVector build_resize(const Node& node,
-                                        const std::shared_ptr<ngraph::Node>& output_shape,
-                                        const AxisSet& axes)
+                OutputVector build_resize(const Node& node,
+                                          const std::shared_ptr<ngraph::Node>& output_shape,
+                                          const AxisSet& axes)
                 {
                     const auto mode = node.get_attribute_value<std::string>("mode", "nearest");
 
@@ -106,7 +106,7 @@ namespace ngraph
 
             namespace set_11
             {
-                NodeVector resize(const onnx_import::Node& node)
+                OutputVector resize(const onnx_import::Node& node)
                 {
                     // cubic_coeff_a, extrapolation_value attributes are ignored
                     // (they do not have influence on supported modes)
@@ -147,12 +147,12 @@ namespace ngraph
                     // in "tf_crop_and_resize" which is not handled now
                     const auto inputs = node.get_ng_inputs();
                     const auto& data = inputs.at(0);
-                    const auto& data_shape = data->get_output_partial_shape(0);
+                    const auto& data_shape = data.get_partial_shape();
 
                     if (inputs.size() == 4) // sizes input is provided
                     {
                         const auto& sizes = inputs.at(3);
-                        const auto& sizes_shape = sizes->get_output_partial_shape(0);
+                        const auto& sizes_shape = sizes.get_partial_shape();
 
                         CHECK_VALID_NODE(
                             node,
@@ -162,12 +162,13 @@ namespace ngraph
                         size_t axes_size = sizes_shape.is_static() ? sizes_shape[0].get_length()
                                                                    : data_shape.rank().get_length();
 
-                        return build_resize(
-                            node, sizes, AxisSet(common::get_monotonic_range(axes_size)));
+                        return build_resize(node,
+                                            sizes.get_node_shared_ptr(),
+                                            AxisSet(common::get_monotonic_range(axes_size)));
                     }
 
                     const auto& scales = inputs.at(2);
-                    const auto& scales_shape = scales->get_output_partial_shape(0);
+                    const auto& scales_shape = scales.get_partial_shape();
 
                     CHECK_VALID_NODE(
                         node,
@@ -186,14 +187,14 @@ namespace ngraph
 
             namespace set_1
             {
-                NodeVector resize(const onnx_import::Node& node)
+                OutputVector resize(const onnx_import::Node& node)
                 {
                     const auto inputs = node.get_ng_inputs();
                     const auto& data = inputs.at(0);
                     const auto& scales = inputs.at(1);
 
-                    const auto& data_shape = data->get_output_partial_shape(0);
-                    const auto& scales_shape = scales->get_output_partial_shape(0);
+                    const auto& data_shape = data.get_partial_shape();
+                    const auto& scales_shape = scales.get_partial_shape();
 
                     CHECK_VALID_NODE(
                         node,
index 41b7f90..61b3a26 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector resize(const Node& node);
+                OutputVector resize(const Node& node);
 
             } // namespace set_1
 
             namespace set_11
             {
-                NodeVector resize(const Node& node);
+                OutputVector resize(const Node& node);
             }
 
         } // namespace op
index ee944e3..c8e0f85 100644 (file)
@@ -31,7 +31,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector reverse_sequence(const Node& node)
+                OutputVector reverse_sequence(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
 
@@ -39,7 +39,7 @@ namespace ngraph
                     // nGraph supports only int32 type of sequence_lengths
                     const auto sequence_lengths_i32 = std::make_shared<default_opset::Convert>(
                         node.get_ng_inputs().at(1), element::i32);
-                    const auto data_rank = data->get_output_partial_shape(0).rank();
+                    const auto data_rank = data.get_partial_shape().rank();
 
                     const auto batch_axis = node.get_attribute_value<int64_t>("batch_axis", 1);
                     const auto normalized_batch_axis =
index ec3d779..0a1dce0 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector reverse_sequence(const Node& node);
+                OutputVector reverse_sequence(const Node& node);
 
             } // namespace set_1
 
index 8ea927e..37c9ccb 100644 (file)
@@ -49,7 +49,7 @@ namespace ngraph
                     };
                 }
 
-                NodeVector rnn(const Node& node)
+                OutputVector rnn(const Node& node)
                 {
                     constexpr std::size_t gates_count = 1;
                     RNNInputMap input_map{node, gates_count};
index e1e789a..d61ae83 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector rnn(const Node& node);
+                OutputVector rnn(const Node& node);
 
             } // namespace set_1
 
index 79018a5..cf86fc8 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector roi_align(const Node& node)
+                OutputVector roi_align(const Node& node)
                 {
                     const auto inputs = node.get_ng_inputs();
 
index 5231375..8df9824 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector roi_align(const Node& node);
+                OutputVector roi_align(const Node& node);
 
             } // namespace set_1
 
index ed8f819..ee58641 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #include <memory>
 
 #include "ngraph/opsets/opset0.hpp"
@@ -27,9 +30,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector round(const Node& node)
+                OutputVector round(const Node& node)
                 {
-                    const std::shared_ptr<ngraph::Node> data{node.get_ng_inputs().at(0)};
+                    const Output<ngraph::Node> data{node.get_ng_inputs().at(0)};
                     return {std::make_shared<ngraph::opset0::Round>(data)};
                 }
             } // namespace set_1
index b13832f..c03a287 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #pragma once
 
 #include "core/node.hpp"
@@ -27,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector round(const Node& node);
+                OutputVector round(const Node& node);
 
             } // namespace set_1
 
index 1873da7..738a2d7 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector scatter_elements(const Node& node)
+                OutputVector scatter_elements(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
                     const auto indices = node.get_ng_inputs().at(1);
index a9b2f8b..288742a 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector scatter_elements(const Node& node);
+                OutputVector scatter_elements(const Node& node);
 
             } // namespace set_1
 
index 9a69a28..5d13564 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #include <memory>
 
 #include "ngraph/opsets/opset0.hpp"
@@ -27,9 +30,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector scatter_nd(const Node& node)
+                OutputVector scatter_nd(const Node& node)
                 {
-                    NodeVector ng_inputs{node.get_ng_inputs()};
+                    OutputVector ng_inputs{node.get_ng_inputs()};
                     auto data = ng_inputs.at(0);
                     auto indices = ng_inputs.at(1);
                     auto updates = ng_inputs.at(2);
index 5f9f91a..371eedc 100644 (file)
@@ -14,6 +14,9 @@
 // limitations under the License.
 //*****************************************************************************
 
+// Disabled in CMakeList
+// Update to higher opset required
+
 #pragma once
 
 #include "core/node.hpp"
@@ -27,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector scatter_nd(const Node& node);
+                OutputVector scatter_nd(const Node& node);
 
             } // namespace set_1
 
index 71ea132..ab697df 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector selu(const Node& node)
+                OutputVector selu(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     auto alpha =
@@ -39,10 +39,10 @@ namespace ngraph
                         node.get_attribute_value<double>("gamma", 1.05070102214813232421875);
 
                     auto alpha_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {alpha});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {alpha});
 
                     auto gamma_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {gamma});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {gamma});
 
                     return {std::make_shared<default_opset::Selu>(data, alpha_node, gamma_node)};
                 }
index fbae41a..b3010da 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector selu(const Node& node);
+                OutputVector selu(const Node& node);
 
             } // namespace set_1
 
index ddb3435..9ff6f8d 100644 (file)
@@ -30,10 +30,10 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector shape(const Node& node)
+                OutputVector shape(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
-                    const auto data_shape = data->get_output_partial_shape(0);
+                    const auto data_shape = data.get_partial_shape();
 
                     if (data_shape.is_static())
                     {
index 2af5a7e..ef2e5f9 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector shape(const Node& node);
+                OutputVector shape(const Node& node);
 
             } // namespace set_1
 
index ba8c29f..83c6431 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector shrink(const Node& node)
+                OutputVector shrink(const Node& node)
                 {
                     const auto input = node.get_ng_inputs().at(0);
                     const float bias = node.get_attribute_value<float>("bias", 0.0f);
@@ -41,7 +41,7 @@ namespace ngraph
                                      " must not be negative.");
 
                     std::shared_ptr<default_opset::Constant> negative_lambd;
-                    const auto input_element_type = input->get_element_type();
+                    const auto input_element_type = input.get_element_type();
                     if (input_element_type.is_signed())
                     {
                         negative_lambd =
index 6700f6b..a2b78fb 100644 (file)
@@ -33,7 +33,7 @@ namespace ngraph
                 ///       Input values greater or equal to '-lambd' and less or equal to 'lambd' are
                 ///       zeroed-out. 'Bias' is added to the values that are less than '-lambd'
                 ///       and subtracted from values greater than 'lambd'.
-                NodeVector shrink(const Node& node);
+                OutputVector shrink(const Node& node);
             } // namespace set_1
 
         } // namespace op
index 95fbca3..c9f1fac 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector sigmoid(const Node& node)
+                inline OutputVector sigmoid(const Node& node)
                 {
                     return {std::make_shared<default_opset::Sigmoid>(node.get_ng_inputs().at(0))};
                 }
index 53063bb..c9dc59b 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector sign(const Node& node)
+                inline OutputVector sign(const Node& node)
                 {
                     return {std::make_shared<default_opset::Sign>(node.get_ng_inputs().at(0))};
                 }
index c23efe8..88d58e7 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector sin(const Node& node)
+                inline OutputVector sin(const Node& node)
                 {
                     return {std::make_shared<default_opset::Sin>(node.get_ng_inputs().at(0))};
                 }
index 6f5026f..2f709e1 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector sinh(const Node& node)
+                inline OutputVector sinh(const Node& node)
                 {
                     return {std::make_shared<default_opset::Sinh>(node.get_ng_inputs().at(0))};
                 }
index 9d68f7d..c8612a3 100644 (file)
@@ -31,11 +31,11 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector size(const Node& node)
+                OutputVector size(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     std::int64_t tensor_elements_count{
-                        static_cast<std::int64_t>(shape_size(data->get_shape()))};
+                        static_cast<std::int64_t>(shape_size(data.get_shape()))};
 
                     return {std::make_shared<default_opset::Constant>(
                         ngraph::element::i64,
index 2e8c990..6bd0077 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector size(const Node& node);
+                OutputVector size(const Node& node);
 
             } // namespace set_1
 
index 2ad0606..0591c53 100644 (file)
@@ -108,15 +108,14 @@ namespace ngraph
                 ///
                 /// \return Sub-graph represents adjusted indices or input indices
                 ///         if any transformation was needed.
-                std::shared_ptr<ngraph::Node>
-                    adjust_indices_if_needed(const std::shared_ptr<ngraph::Node>& indices,
-                                             const std::vector<uint64_t>& axes,
-                                             uint64_t slice_indices_length,
-                                             int64_t fill_in_value)
+                Output<ngraph::Node> adjust_indices_if_needed(const Output<ngraph::Node>& indices,
+                                                              const std::vector<uint64_t>& axes,
+                                                              uint64_t slice_indices_length,
+                                                              int64_t fill_in_value)
                 {
                     const bool are_axes_sorted = std::is_sorted(axes.begin(), axes.end());
 
-                    const auto indices_shape = indices->get_output_partial_shape(0);
+                    const auto indices_shape = indices.get_partial_shape();
                     // if length of slice indices vector is known
                     if (indices_shape.rank().is_static() &&
                         indices_shape.rank().get_length() == 1 && indices_shape[0].is_static())
@@ -177,22 +176,23 @@ namespace ngraph
 
             namespace set_10
             {
-                NodeVector slice(const Node& node)
+                OutputVector slice(const Node& node)
                 {
-                    NodeVector inputs{node.get_ng_inputs()};
+                    OutputVector inputs{node.get_ng_inputs()};
                     const auto data = inputs.at(0);
-                    const auto data_rank = data->get_output_partial_shape(0).rank();
+                    const auto data_rank = data.get_partial_shape().rank();
 
                     auto starts = inputs.at(1);
                     auto ends = inputs.at(2);
 
                     // Slice is calculated over all axes as default
-                    std::shared_ptr<ngraph::Node> axes;
+                    Output<ngraph::Node> axes;
                     if (inputs.size() >= 4) // axes input provided
                     {
                         axes = inputs.at(3);
-                        CHECK_VALID_NODE(
-                            node, ngraph::op::is_constant(axes), "Axes input must be constant");
+                        CHECK_VALID_NODE(node,
+                                         ngraph::op::is_constant(axes.get_node()),
+                                         "Axes input must be constant");
                     }
                     else
                     {
@@ -207,7 +207,8 @@ namespace ngraph
                             common::get_monotonic_range<int64_t>(data_rank_value));
                     }
 
-                    const auto axes_const = as_type_ptr<default_opset::Constant>(axes);
+                    const auto axes_const =
+                        as_type_ptr<default_opset::Constant>(axes.get_node_shared_ptr());
                     auto raw_axes_vec = axes_const->cast_vector<int64_t>();
                     std::vector<uint64_t> axes_vec =
                         get_normalized_axes_vector(node, data_rank, raw_axes_vec);
@@ -216,7 +217,7 @@ namespace ngraph
                         *std::max_element(std::begin(axes_vec), std::end(axes_vec)) + 1;
                     const auto begin_end_mask = axes_to_mask(axes_vec, slice_indices_length);
 
-                    std::shared_ptr<ngraph::Node> steps = nullptr;
+                    Output<ngraph::Node> steps;
                     if (inputs.size() == 5) // steps input provided
                     {
                         steps = inputs.at(4);
@@ -240,10 +241,10 @@ namespace ngraph
 
             namespace set_1
             {
-                NodeVector slice(const Node& node)
+                OutputVector slice(const Node& node)
                 {
-                    std::shared_ptr<ngraph::Node> data = node.get_ng_inputs().at(0);
-                    const auto data_rank = data->get_output_partial_shape(0).rank();
+                    Output<ngraph::Node> data = node.get_ng_inputs().at(0);
+                    const auto data_rank = data.get_partial_shape().rank();
 
                     const auto starts_atr =
                         node.get_attribute_value<std::vector<int64_t>>("starts");
@@ -281,10 +282,13 @@ namespace ngraph
                         std::vector<int64_t>(slice_indices_length, 1));
 
                     starts =
-                        adjust_indices_if_needed(starts, normalized_axes, slice_indices_length, 0);
-                    ends = adjust_indices_if_needed(ends, normalized_axes, slice_indices_length, 0);
+                        adjust_indices_if_needed(starts, normalized_axes, slice_indices_length, 0)
+                            .get_node_shared_ptr();
+                    ends = adjust_indices_if_needed(ends, normalized_axes, slice_indices_length, 0)
+                               .get_node_shared_ptr();
                     strides =
-                        adjust_indices_if_needed(strides, normalized_axes, slice_indices_length, 1);
+                        adjust_indices_if_needed(strides, normalized_axes, slice_indices_length, 1)
+                            .get_node_shared_ptr();
 
                     return {std::make_shared<default_opset::StridedSlice>(
                         data, starts, ends, strides, begin_end_mask, begin_end_mask)};
index c8d9267..7167c67 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_10
             {
-                NodeVector slice(const Node& node);
+                OutputVector slice(const Node& node);
 
             } // namespace set_10
 
             namespace set_1
             {
-                NodeVector slice(const Node& node);
+                OutputVector slice(const Node& node);
 
             } // namespace set_1
 
index c03b528..f23f00e 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
     {
         namespace
         {
-            std::shared_ptr<ngraph::Node> onnx_softmax(const std::shared_ptr<ngraph::Node> data,
+            std::shared_ptr<ngraph::Node> onnx_softmax(const Output<ngraph::Node> data,
                                                        const int64_t axis)
             {
                 const auto coerced_data = ngraph::builder::opset1::flatten(data, axis);
@@ -45,9 +45,9 @@ namespace ngraph
                     std::make_shared<default_opset::Subtract>(coerced_data, reshaped_max);
 
                 const auto result = std::make_shared<default_opset::Softmax>(data_minus_max, 1);
-                if (data->get_output_partial_shape(0).is_static())
+                if (data.get_partial_shape().is_static())
                 {
-                    return ngraph::builder::opset1::reshape(result, data->get_output_shape(0));
+                    return ngraph::builder::opset1::reshape(result, data.get_shape());
                 }
                 else
                 {
@@ -61,10 +61,10 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector softmax(const Node& node)
+                OutputVector softmax(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
-                    const auto data_rank = data->get_output_partial_shape(0).rank();
+                    const auto data_rank = data.get_partial_shape().rank();
                     NGRAPH_CHECK(data_rank.is_static(),
                                  "ONNX Softmax data rank needs to be known (static)");
 
@@ -76,21 +76,21 @@ namespace ngraph
                     case 0:
                     {
                         result =
-                            default_opset::Constant::create(data->get_element_type(), Shape{}, {1});
+                            default_opset::Constant::create(data.get_element_type(), Shape{}, {1});
                         break;
                     }
                     case 1:
                     {
                         // checks if the axis belongs to the allowed values set (-1 and 0 for 1D)
                         ngraph::normalize_axis(
-                            node.get_description(), axis, data->get_output_partial_shape(0).rank());
+                            node.get_description(), axis, data.get_partial_shape().rank());
                         result = std::make_shared<default_opset::Softmax>(data, 0);
                         break;
                     }
                     default:
                     {
                         const auto normalized_axis = ngraph::normalize_axis(
-                            node.get_description(), axis, data->get_output_partial_shape(0).rank());
+                            node.get_description(), axis, data.get_partial_shape().rank());
 
                         result = onnx_softmax(data, normalized_axis);
                         break;
index 3440e24..5841bfb 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector softmax(const Node& node);
+                OutputVector softmax(const Node& node);
 
             } // namespace set_1
 
index 499f638..2daca77 100644 (file)
@@ -28,14 +28,14 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector softplus(const Node& node)
+                OutputVector softplus(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
 
                     const std::shared_ptr<ngraph::Node> zero_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {0.f});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {0.f});
                     const std::shared_ptr<ngraph::Node> one_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {1.f});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {1.f});
 
                     // data + log(exp(-data) + 1)
                     const std::shared_ptr<ngraph::Node> positive_val_node =
index e897f76..82dd04e 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector softplus(const Node& node);
+                OutputVector softplus(const Node& node);
 
             } // namespace set_1
 
index 2324b2d..95853f8 100644 (file)
@@ -29,12 +29,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector softsign(const Node& node)
+                OutputVector softsign(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
 
                     std::shared_ptr<ngraph::Node> one_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {1});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {1});
                     auto abs_data = std::make_shared<default_opset::Abs>(data);
                     auto data_plus_one_node =
                         std::make_shared<default_opset::Add>(abs_data, one_node);
index 6e58e1e..df29a1c 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector softsign(const Node& node);
+                OutputVector softsign(const Node& node);
 
             } // namespace set_1
 
index d7170f6..20ee6c7 100644 (file)
@@ -25,12 +25,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector space_to_depth(const Node& node)
+                OutputVector space_to_depth(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     std::size_t block_size = node.get_attribute_value<std::int64_t>("blocksize");
                     const auto mode = default_opset::SpaceToDepth::SpaceToDepthMode::BLOCKS_FIRST;
-                    return NodeVector{
+                    return OutputVector{
                         std::make_shared<default_opset::SpaceToDepth>(data, mode, block_size)};
                 }
             } // namespace set_1
index 818c2c2..47abc43 100644 (file)
@@ -31,9 +31,9 @@ namespace ngraph
                 ///
                 /// \param[in]  node  The ONNX input node describing operation.
                 ///
-                /// \return     NodeVector containing Tensor with shape:
+                /// \return     OutputVector containing Tensor with shape:
                 ///             [N, C * blocksize * blocksize, H / blocksize, W / blocksize]
-                NodeVector space_to_depth(const Node& node);
+                OutputVector space_to_depth(const Node& node);
             } // namespace set_1
 
         } // namespace op
index e08b839..c5f36c2 100644 (file)
@@ -29,7 +29,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector split(const Node& node)
+                OutputVector split(const Node& node)
                 {
                     const auto input = node.get_ng_inputs().at(0);
                     const auto axis = node.get_attribute_value<int64_t>("axis", 0);
index ea100a7..7641e55 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector split(const Node& node);
+                OutputVector split(const Node& node);
 
             } // namespace set_1
 
index dbd559a..439b666 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector sqrt(const Node& node)
+                inline OutputVector sqrt(const Node& node)
                 {
                     return {std::make_shared<default_opset::Sqrt>(node.get_ng_inputs().at(0))};
                 }
index d28ea30..e6fd074 100644 (file)
@@ -29,12 +29,12 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector squeeze(const Node& node)
+                OutputVector squeeze(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     std::vector<std::int64_t> axes =
                         node.get_attribute_value<std::vector<std::int64_t>>("axes", {});
-                    const auto data_rank = data->get_output_partial_shape(0).rank();
+                    const auto data_rank = data.get_partial_shape().rank();
 
                     std::vector<std::size_t> normalized_axes =
                         ngraph::normalize_axes(node.get_description(), axes, data_rank);
index d4885c6..9e7bb1f 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector squeeze(const Node& node);
+                OutputVector squeeze(const Node& node);
 
             } // namespace set_1
 
index 6a01a63..0838770 100644 (file)
@@ -29,7 +29,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector sub(const Node& node)
+                inline OutputVector sub(const Node& node)
                 {
                     const Output<ngraph::Node> lhs_node = node.get_ng_inputs().at(0);
                     Output<ngraph::Node> rhs_node = node.get_ng_inputs().at(1);
@@ -47,7 +47,7 @@ namespace ngraph
 
             namespace set_7
             {
-                inline NodeVector sub(const Node& node)
+                inline OutputVector sub(const Node& node)
                 {
                     return {std::make_shared<default_opset::Subtract>(node.get_ng_inputs().at(0),
                                                                       node.get_ng_inputs().at(1))};
index 2419f78..273bb1d 100644 (file)
@@ -29,7 +29,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector sum(const Node& node)
+                inline OutputVector sum(const Node& node)
                 {
                     return variadic::make_ng_variadic_op<default_opset::Add>(
                         node, ngraph::op::AutoBroadcastSpec::NONE);
@@ -39,7 +39,7 @@ namespace ngraph
 
             namespace set_8
             {
-                inline NodeVector sum(const Node& node)
+                inline OutputVector sum(const Node& node)
                 {
                     return variadic::make_ng_variadic_op<default_opset::Add>(node);
                 }
index 6ee52e9..801a549 100644 (file)
@@ -65,7 +65,7 @@ opset versions starting from `1` to `6` and to the latest opset version.
 | Identity | 1- | 0,1 | 
 | InstanceNormalization | 1- | 0, (1) | Have to change to only v1 ops (NGONNX-1015)
 | LRN | 1- | 0,1 |
-| LSTM | 1-7- | 0,(1) | (NGONNX-1015), there is `GetOutputElement` (3 outputs), LSTMSequence and LSTMCell uses some v0 ops which aren't used in v1
+| LSTM | 1-7- | 0,(1) |
 | LeakyRelu | 1-6- | 0,(1) | (NGONNX-1015)
 | Less | 1-7-9 | 0,1 |
 | Log | 1-6- | 0,1 |
index 4d1d2da..46853bf 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector tan(const Node& node)
+                inline OutputVector tan(const Node& node)
                 {
                     return {std::make_shared<default_opset::Tan>(node.get_ng_inputs().at(0))};
                 }
index fdb7511..2d1adbc 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector tanh(const Node& node)
+                inline OutputVector tanh(const Node& node)
                 {
                     return {std::make_shared<default_opset::Tanh>(node.get_ng_inputs().at(0))};
                 }
index 3f9cda1..8631ac1 100644 (file)
@@ -28,17 +28,17 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector thresholded_relu(const Node& node)
+                OutputVector thresholded_relu(const Node& node)
                 {
                     const auto data = node.get_ng_inputs().at(0);
                     const double alpha = node.get_attribute_value<double>("alpha", 1.0);
 
                     const auto alpha_node =
-                        default_opset::Constant::create(data->get_element_type(), Shape{}, {alpha});
+                        default_opset::Constant::create(data.get_element_type(), Shape{}, {alpha});
 
                     const auto data_map = std::make_shared<default_opset::Convert>(
                         std::make_shared<default_opset::Greater>(data, alpha_node),
-                        data->get_element_type());
+                        data.get_element_type());
 
                     return {std::make_shared<default_opset::Multiply>(data, data_map)};
                 }
index 6960dc9..3e29492 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector thresholded_relu(const Node& node);
+                OutputVector thresholded_relu(const Node& node);
 
             } // namespace set_1
 
index 8786113..e73019c 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector tile(const Node& node)
+                OutputVector tile(const Node& node)
                 {
                     auto input = node.get_ng_inputs().at(0);
                     auto repeats = node.get_ng_inputs().at(1);
index badd6b3..a1e4a80 100644 (file)
@@ -31,7 +31,7 @@ namespace ngraph
                 ///
                 /// \param node The ONNX node object representing this operation.
                 /// \return The vector containing nGraph a node producing the output of the Tile op.
-                NodeVector tile(const Node& node);
+                OutputVector tile(const Node& node);
 
             } // namespace set_1
 
index 1bea7e7..ee3ca4b 100644 (file)
@@ -20,7 +20,6 @@
 #include "default_opset.hpp"
 #include "ngraph/node.hpp"
 #include "ngraph/op/constant.hpp"
-#include "ngraph/op/get_output_element.hpp"
 #include "ngraph/op/topk.hpp"
 #include "ngraph/shape.hpp"
 #include "ngraph/type/element_type.hpp"
@@ -36,31 +35,20 @@ namespace
         std::int64_t axis{node.get_attribute_value<std::int64_t>("axis", -1)};
 
         const auto data = node.get_ng_inputs().at(0);
-        const auto data_rank = data->get_output_partial_shape(0).rank();
+        const auto data_rank = data.get_partial_shape().rank();
         return ngraph::normalize_axis(node.get_description(), axis, data_rank);
     }
 
     /// \return Return the second input to the TopK node reshaped to a scalar.
-    std::shared_ptr<ngraph::Node> get_k(const ngraph::onnx_import::Node& node)
+    ngraph::Output<ngraph::Node> get_k(const ngraph::onnx_import::Node& node)
     {
         auto k_node = node.get_ng_inputs().at(1);
-        NGRAPH_CHECK(shape_size(k_node->get_shape()) == 1,
+        NGRAPH_CHECK(shape_size(k_node.get_shape()) == 1,
                      "ONNX TopK operator: 'K' parameter must contain a single positive value.",
                      node);
 
         return ngraph::onnx_import::reshape::interpret_as_scalar(k_node);
     }
-
-    /// \return Return the outputs of the TopK node.
-    ngraph::NodeVector get_outputs(const std::shared_ptr<ngraph::Node>& node)
-    {
-        std::shared_ptr<ngraph::Node> values =
-            std::make_shared<ngraph::op::v0::GetOutputElement>(node, 0);
-        std::shared_ptr<ngraph::Node> indices =
-            std::make_shared<ngraph::op::v0::GetOutputElement>(node, 1);
-
-        return {values, indices};
-    }
 }
 
 namespace ngraph
@@ -71,7 +59,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector topk(const Node& node)
+                OutputVector topk(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     std::int64_t k{node.get_attribute_value<std::int64_t>("k")};
@@ -86,13 +74,13 @@ namespace ngraph
                         default_opset::TopK::SortType::SORT_VALUES,
                         element::i64);
 
-                    return get_outputs(top_k);
+                    return {top_k->output(0), top_k->output(1)};
                 }
             }
 
             namespace set_10
             {
-                NodeVector topk(const Node& node)
+                OutputVector topk(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     auto k = get_k(node);
@@ -106,13 +94,13 @@ namespace ngraph
                         default_opset::TopK::SortType::SORT_VALUES,
                         element::i64);
 
-                    return get_outputs(top_k);
+                    return {top_k->output(0), top_k->output(1)};
                 }
             }
 
             namespace set_11
             {
-                NodeVector topk(const Node& node)
+                OutputVector topk(const Node& node)
                 {
                     // Process inputs
                     auto data = node.get_ng_inputs().at(0);
@@ -134,7 +122,7 @@ namespace ngraph
                     std::shared_ptr<ngraph::Node> top_k = std::make_shared<default_opset::TopK>(
                         data, k, axis, mode, sort_type, element::i64);
 
-                    return get_outputs(top_k);
+                    return {top_k->output(0), top_k->output(1)};
                 }
             }
 
index b2cafad..d5da4d9 100644 (file)
@@ -32,7 +32,7 @@ namespace ngraph
                 /// \param node The ONNX node object representing this operation.
                 /// \return The vector containing Ngraph nodes producing output of ONNX TopK
                 ///         operation (both values and indices).
-                NodeVector topk(const Node& node);
+                OutputVector topk(const Node& node);
             }
 
             /// \brief Performs TopK operation from ONNX version 1.5
@@ -41,7 +41,7 @@ namespace ngraph
             /// attribute.
             namespace set_10
             {
-                NodeVector topk(const Node& node);
+                OutputVector topk(const Node& node);
             }
 
             /// \brief Performs TopK operation from ONNX version 1.6
@@ -49,7 +49,7 @@ namespace ngraph
             /// \details ONNX op set 11 added support for `largest` and `sorted` attributes.
             namespace set_11
             {
-                NodeVector topk(const Node& node);
+                OutputVector topk(const Node& node);
             }
 
         } // namespace op
index 6b366c5..6157952 100644 (file)
@@ -29,9 +29,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector transpose(const Node& node)
+                OutputVector transpose(const Node& node)
                 {
-                    std::shared_ptr<ngraph::Node> data = node.get_ng_inputs().at(0);
+                    Output<ngraph::Node> data = node.get_ng_inputs().at(0);
 
                     auto permute_axes =
                         node.get_attribute_value<std::vector<std::size_t>>("perm", {});
index dc5a861..867e3fb 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector transpose(const Node& node);
+                OutputVector transpose(const Node& node);
 
             } // namespace set_1
 
index 0bcde4e..8f97b3b 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector unsqueeze(const Node& node)
+                OutputVector unsqueeze(const Node& node)
                 {
                     auto data = node.get_ng_inputs().at(0);
                     auto axes = node.get_attribute_value<std::vector<std::int64_t>>("axes", {});
index 1537fb3..f806eba 100644 (file)
@@ -27,7 +27,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector unsqueeze(const Node& node);
+                OutputVector unsqueeze(const Node& node);
 
             } // namespace set_1
 
index 5c65af7..26427e8 100644 (file)
@@ -56,12 +56,12 @@ namespace ngraph
 
             namespace set_1
             {
-                NodeVector upsample(const onnx_import::Node& node)
+                OutputVector upsample(const onnx_import::Node& node)
                 {
                     const auto inputs = node.get_ng_inputs();
                     const auto data = inputs.at(0);
 
-                    const auto data_shape = data->get_output_partial_shape(0);
+                    const auto data_shape = data.get_partial_shape();
 
                     const auto scales = node.get_attribute_value<std::vector<float>>("scales");
                     const auto mode = node.get_attribute_value<std::string>("mode", "nearest");
@@ -110,14 +110,14 @@ namespace ngraph
 
             namespace set_9
             {
-                NodeVector upsample(const onnx_import::Node& node)
+                OutputVector upsample(const onnx_import::Node& node)
                 {
                     const auto inputs = node.get_ng_inputs();
                     const auto data = inputs.at(0);
                     const auto scales = inputs.at(1);
 
-                    const auto data_shape = data->get_output_partial_shape(0);
-                    const auto scales_shape = scales->get_output_partial_shape(0);
+                    const auto data_shape = data.get_partial_shape();
+                    const auto scales_shape = scales.get_partial_shape();
 
                     const auto mode = node.get_attribute_value<std::string>("mode", "nearest");
                     check_mode_support(node, mode);
@@ -138,10 +138,10 @@ namespace ngraph
                         attrs.axes.insert(ax);
                     }
 
-                    if (ngraph::op::is_constant(scales) && data_shape.is_static())
+                    if (ngraph::op::is_constant(scales.get_node()) && data_shape.is_static())
                     {
                         const auto scales_const =
-                            as_type_ptr<default_opset::Constant>(scales->shared_from_this());
+                            as_type_ptr<default_opset::Constant>(scales.get_node_shared_ptr());
 
                         auto scales_vector = scales_const->cast_vector<float>();
                         auto data_static_shape = data_shape.to_shape();
index 56dffc1..4f476f5 100644 (file)
@@ -27,13 +27,13 @@ namespace ngraph
         {
             namespace set_1
             {
-                NodeVector upsample(const Node& node);
+                OutputVector upsample(const Node& node);
 
             } // namespace set_1
 
             namespace set_9
             {
-                NodeVector upsample(const Node& node);
+                OutputVector upsample(const Node& node);
 
             } // namespace set_9
 
index 6e30c2e..2934827 100644 (file)
@@ -30,9 +30,9 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector where(const Node& node)
+                inline OutputVector where(const Node& node)
                 {
-                    NodeVector ng_inputs{node.get_ng_inputs()};
+                    OutputVector ng_inputs{node.get_ng_inputs()};
 
                     return {std::make_shared<default_opset::Select>(
                         ng_inputs.at(0), ng_inputs.at(1), ng_inputs.at(2))};
index 11b55c1..8aeff0e 100644 (file)
@@ -28,7 +28,7 @@ namespace ngraph
         {
             namespace set_1
             {
-                inline NodeVector logical_xor(const Node& node)
+                inline OutputVector logical_xor(const Node& node)
                 {
                     return {std::make_shared<default_opset::LogicalXor>(
                         node.get_ng_inputs().at(0),
index a253846..d709d0f 100644 (file)
@@ -48,7 +48,7 @@ namespace ngraph
                     make_topk_subgraph(default_opset::TopK::Mode mode) const;
 
                 const std::int64_t m_keep_dims;
-                std::shared_ptr<ngraph::Node> m_input_node;
+                Output<ngraph::Node> m_input_node;
                 std::int64_t m_axis;
             };
 
index 32a78c6..9a369df 100644 (file)
@@ -30,7 +30,7 @@ namespace ngraph
         {
             Shape get_kernel_shape(const Node& node)
             {
-                const auto& data_shape = node.get_ng_inputs().at(0)->get_output_partial_shape(0);
+                const auto& data_shape = node.get_ng_inputs().at(0).get_partial_shape();
                 const size_t input_spatial_dims = data_shape.rank().get_length() - 2;
                 return node.get_attribute_value<std::vector<size_t>>(
                     "kernel_shape", std::vector<size_t>(input_spatial_dims, 1UL));
@@ -48,8 +48,7 @@ namespace ngraph
                 std::vector<std::size_t> get_attr_default_value(const Node& node,
                                                                 const std::string& attr_name)
                 {
-                    const auto data_rank =
-                        node.get_ng_inputs().at(0)->get_output_partial_shape(0).rank();
+                    const auto data_rank = node.get_ng_inputs().at(0).get_partial_shape().rank();
                     CHECK_VALID_NODE(node,
                                      data_rank.is_static(),
                                      "If '",
@@ -152,8 +151,7 @@ namespace ngraph
 
             std::pair<CoordinateDiff, CoordinateDiff> get_pads(const Node& node)
             {
-                const auto data_rank =
-                    node.get_ng_inputs().at(0)->get_output_partial_shape(0).rank();
+                const auto data_rank = node.get_ng_inputs().at(0).get_partial_shape().rank();
                 CHECK_VALID_NODE(node,
                                  data_rank.is_static(),
                                  "The rank of node must be static in order to calculate pads");
index 4b67d4a..58cba55 100644 (file)
@@ -42,7 +42,7 @@ namespace ngraph
                 m_padding_above = Shape{std::begin(padding_above), std::end(padding_above)};
             }
 
-            NodeVector PoolingFactory::make_avg_pool() const
+            OutputVector PoolingFactory::make_avg_pool() const
             {
                 const bool count_include_pad =
                     m_onnx_node.get_attribute_value<std::int64_t>("count_include_pad", 0);
@@ -56,7 +56,7 @@ namespace ngraph
                                                                  m_auto_pad)};
             }
 
-            NodeVector PoolingFactory::make_max_pool() const
+            OutputVector PoolingFactory::make_max_pool() const
             {
                 return {std::make_shared<default_opset::MaxPool>(m_inputs.at(0),
                                                                  m_strides,
@@ -77,7 +77,7 @@ namespace ngraph
             GlobalPoolingFactory::GlobalPoolingFactory(const Node& node)
                 : PoolingFactory(node)
             {
-                const auto data_shape = node.get_ng_inputs().at(0)->get_output_partial_shape(0);
+                const auto data_shape = node.get_ng_inputs().at(0).get_partial_shape();
                 const auto data_rank = data_shape.rank();
                 CHECK_VALID_NODE(
                     node, data_rank.is_static(), "Data rank must be static for global pooling ops");
index 19bc2bb..bb705d0 100644 (file)
@@ -54,19 +54,19 @@ namespace ngraph
                 /// \brief      Creates average pooling ONNX operation.
                 /// \return     Vector of output nodes.
                 ///
-                NodeVector make_avg_pool() const;
+                OutputVector make_avg_pool() const;
 
                 ///
                 /// \brief      Creates max pooling ONNX operation.
                 /// \return     Vector of output nodes.
                 ///
-                NodeVector make_max_pool() const;
+                OutputVector make_max_pool() const;
 
             protected:
                 explicit PoolingFactory(const Node& node);
 
                 Node m_onnx_node;
-                const NodeVector m_inputs;
+                const OutputVector m_inputs;
                 Shape m_kernel_shape;
                 Strides m_strides;
                 Strides m_dilations;
index a9619c6..d6f3db2 100644 (file)
@@ -41,11 +41,11 @@ namespace ngraph
                 m_map[OpInput::W] = ng_inputs.at(1);
                 m_map[OpInput::R] = ng_inputs.at(2);
 
-                const auto el_type = ng_inputs.at(0)->get_output_element_type(0);
+                const auto el_type = ng_inputs.at(0).get_element_type();
 
-                const auto x_pshape = m_map[OpInput::X]->get_output_partial_shape(0);
-                const auto w_pshape = m_map[OpInput::W]->get_output_partial_shape(0);
-                const auto r_pshape = m_map[OpInput::R]->get_output_partial_shape(0);
+                const auto x_pshape = m_map[OpInput::X].get_partial_shape();
+                const auto w_pshape = m_map[OpInput::W].get_partial_shape();
+                const auto r_pshape = m_map[OpInput::R].get_partial_shape();
                 NGRAPH_CHECK(x_pshape.rank().is_static() && x_pshape[0].is_static() &&
                                  x_pshape[1].is_static(),
                              "RecurrentSequence input X must have static \"seq_length\" and "
@@ -57,9 +57,9 @@ namespace ngraph
                              "RecurrentSequence input R must have static \"hidden_size\" "
                              "(innermost) dimension.");
 
-                const std::size_t hidden_size = m_map[OpInput::R]->get_shape().back();
-                const std::size_t batch_size = m_map[OpInput::X]->get_shape().at(1);
-                const std::size_t num_directions = m_map[OpInput::W]->get_shape().front();
+                const std::size_t hidden_size = m_map[OpInput::R].get_shape().back();
+                const std::size_t batch_size = m_map[OpInput::X].get_shape().at(1);
+                const std::size_t num_directions = m_map[OpInput::W].get_shape().front();
 
                 if (ng_inputs.size() > 3 && !ngraph::op::is_null(ng_inputs.at(3)))
                 {
@@ -79,7 +79,7 @@ namespace ngraph
                 else
                 {
                     m_map[OpInput::SEQ_LENGTHS] = std::make_shared<default_opset::Constant>(
-                        element::i32, Shape{batch_size}, m_map[OpInput::X]->get_shape().at(0));
+                        element::i32, Shape{batch_size}, m_map[OpInput::X].get_shape().at(0));
                 }
                 // The initial value of the hidden.
                 if (ng_inputs.size() > 5 && !ngraph::op::is_null(ng_inputs.at(5)))
@@ -98,12 +98,8 @@ namespace ngraph
             {
             }
 
-            std::shared_ptr<ngraph::Node>& OpInputMap::at(const OpInput& key)
-            {
-                return m_map.at(key);
-            }
-
-            const std::shared_ptr<ngraph::Node>& OpInputMap::at(const OpInput& key) const
+            Output<ngraph::Node>& OpInputMap::at(const OpInput& key) { return m_map.at(key); }
+            const Output<ngraph::Node>& OpInputMap::at(const OpInput& key) const
             {
                 return m_map.at(key);
             }
@@ -139,9 +135,9 @@ namespace ngraph
             {
             }
 
-            NodeVector RecurrentSequence::run_sequence(const RecurrentCellFunction& kernel)
+            OutputVector RecurrentSequence::run_sequence(const RecurrentCellFunction& kernel)
             {
-                NodeVector results;
+                OutputVector results;
                 if (m_direction == ngraph::op::RecurrentSequenceDirection::FORWARD ||
                     m_direction == ngraph::op::RecurrentSequenceDirection::REVERSE)
                 {
@@ -150,16 +146,16 @@ namespace ngraph
                 }
                 else if (m_direction == ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL)
                 {
-                    NodeVector fwd_results{recurrent_sequence_pass(kernel)};
-                    NodeVector rev_results{recurrent_sequence_pass(kernel, true)};
+                    OutputVector fwd_results{recurrent_sequence_pass(kernel)};
+                    OutputVector rev_results{recurrent_sequence_pass(kernel, true)};
 
                     // Stack together respective outputs from both forward and reverse passess.
                     std::shared_ptr<ngraph::Node> Y{std::make_shared<default_opset::Concat>(
-                        NodeVector{fwd_results.at(0), rev_results.at(0)}, 1)};
+                        OutputVector{fwd_results.at(0), rev_results.at(0)}, 1)};
                     results.push_back(Y);
 
                     std::shared_ptr<ngraph::Node> Y_h{std::make_shared<default_opset::Concat>(
-                        NodeVector{fwd_results.at(1), rev_results.at(1)}, 0)};
+                        OutputVector{fwd_results.at(1), rev_results.at(1)}, 0)};
                     results.push_back(Y_h);
                 }
                 else
@@ -170,24 +166,23 @@ namespace ngraph
                 return results;
             }
 
-            NodeVector
+            OutputVector
                 RecurrentSequence::recurrent_sequence_pass(const RecurrentCellFunction& kernel,
                                                            bool is_reverse)
             {
                 OutputVector h_list;
 
                 // back-up nodes which we may later modify.
-                std::shared_ptr<ngraph::Node> orig_W = m_args.at(OpInput::W);
-                std::shared_ptr<ngraph::Node> orig_R = m_args.at(OpInput::R);
-                std::shared_ptr<ngraph::Node> orig_B = m_args.at(OpInput::B);
-
-                std::shared_ptr<ngraph::Node> X = m_args.at(OpInput::X);
-                std::shared_ptr<ngraph::Node> H_t =
-                    prepare_input(m_args.at(OpInput::INIT_H), is_reverse);
-                std::shared_ptr<ngraph::Node> W = prepare_input(m_args.at(OpInput::W), is_reverse);
-                std::shared_ptr<ngraph::Node> R = prepare_input(m_args.at(OpInput::R), is_reverse);
-                std::shared_ptr<ngraph::Node> B = prepare_input(m_args.at(OpInput::B), is_reverse);
-                std::shared_ptr<ngraph::Node> seq_lengths = m_args.at(OpInput::SEQ_LENGTHS);
+                Output<ngraph::Node> orig_W = m_args.at(OpInput::W);
+                Output<ngraph::Node> orig_R = m_args.at(OpInput::R);
+                Output<ngraph::Node> orig_B = m_args.at(OpInput::B);
+
+                Output<ngraph::Node> X = m_args.at(OpInput::X);
+                Output<ngraph::Node> H_t = prepare_input(m_args.at(OpInput::INIT_H), is_reverse);
+                Output<ngraph::Node> W = prepare_input(m_args.at(OpInput::W), is_reverse);
+                Output<ngraph::Node> R = prepare_input(m_args.at(OpInput::R), is_reverse);
+                Output<ngraph::Node> B = prepare_input(m_args.at(OpInput::B), is_reverse);
+                Output<ngraph::Node> seq_lengths = m_args.at(OpInput::SEQ_LENGTHS);
 
                 m_args.at(OpInput::W) = W;
                 m_args.at(OpInput::R) = R;
@@ -199,8 +194,7 @@ namespace ngraph
                         X, seq_lengths, 1 /*batch_axis*/, 0 /*seq_axis*/);
                 }
 
-                OutputVector in_seq_steps =
-                    as_output_vector(builder::opset1::split(X, X->get_shape().at(0)));
+                OutputVector in_seq_steps = builder::opset1::split(X, X.get_shape().at(0));
 
                 for (auto& in_x : in_seq_steps)
                 {
@@ -292,7 +286,7 @@ namespace ngraph
                 RecurrentSequence::prepare_input(Output<ngraph::Node> node, bool is_reverse) const
             {
                 // In bidirectional mode inputs are stacked together, so we must split them.
-                std::shared_ptr<ngraph::Node> tmp = node.get_node_shared_ptr();
+                Output<ngraph::Node> tmp = node;
                 if (m_direction == ngraph::op::RecurrentSequenceDirection::BIDIRECTIONAL)
                 {
                     tmp = builder::opset1::split(node, 2).at(is_reverse ? 1 : 0);
index 33d50b1..ce6a8b7 100644 (file)
@@ -55,14 +55,14 @@ namespace ngraph
             ///
             struct OpInputMap
             {
-                using container_type = std::map<OpInput, std::shared_ptr<ngraph::Node>>;
+                using container_type = std::map<OpInput, Output<ngraph::Node>>;
 
                 explicit OpInputMap(const onnx_import::Node& node, std::size_t gates_count);
                 OpInputMap(container_type&& map);
                 virtual ~OpInputMap() = default;
 
-                std::shared_ptr<ngraph::Node>& at(const OpInput& key);
-                const std::shared_ptr<ngraph::Node>& at(const OpInput& key) const;
+                Output<ngraph::Node>& at(const OpInput& key);
+                const Output<ngraph::Node>& at(const OpInput& key) const;
 
                 container_type m_map;
             };
@@ -133,7 +133,7 @@ namespace ngraph
                 ///
                 /// \return     The node vector containing results from all sequence steps.
                 ///
-                NodeVector run_sequence(const RecurrentCellFunction& kernel);
+                OutputVector run_sequence(const RecurrentCellFunction& kernel);
 
             private:
                 ///
@@ -174,8 +174,8 @@ namespace ngraph
                 ///
                 /// \return     The node vector with pass results.
                 ///
-                NodeVector recurrent_sequence_pass(const RecurrentCellFunction& kernel,
-                                                   bool is_reverse = false);
+                OutputVector recurrent_sequence_pass(const RecurrentCellFunction& kernel,
+                                                     bool is_reverse = false);
 
                 OpInputMap& m_args;
                 ngraph::op::RecurrentSequenceDirection m_direction;
index 9d01398..7d90a37 100644 (file)
@@ -35,8 +35,7 @@ namespace ngraph
                     auto reduction_axes =
                         node.get_attribute_value<std::vector<std::int64_t>>("axes", {});
 
-                    const auto input_rank =
-                        node.get_ng_inputs().at(0)->get_output_partial_shape(0).rank();
+                    const auto input_rank = node.get_ng_inputs().at(0).get_partial_shape().rank();
 
                     std::vector<std::size_t> normalized_axes =
                         ngraph::normalize_axes(node.get_description(), reduction_axes, input_rank);
@@ -55,12 +54,11 @@ namespace ngraph
                 }
             } // namespace  detail
 
-            std::shared_ptr<ngraph::Node>
-                make_ng_reduction_op(const Node& node,
-                                     const std::shared_ptr<ngraph::Node>& ng_input,
-                                     ReductionFunction reduction_function)
+            std::shared_ptr<ngraph::Node> make_ng_reduction_op(const Node& node,
+                                                               const Output<ngraph::Node>& ng_input,
+                                                               ReductionFunction reduction_function)
             {
-                auto data_shape = ng_input->get_shape();
+                auto data_shape = ng_input.get_shape();
 
                 auto reduction_axes = detail::get_reduction_axes(node);
 
@@ -92,10 +90,10 @@ namespace ngraph
 
             std::shared_ptr<ngraph::Node>
                 make_ng_reduction_op(const Node& node,
-                                     const std::shared_ptr<ngraph::Node>& ng_input,
+                                     const Output<ngraph::Node>& ng_input,
                                      RuntimeReductionFunction reduction_function)
             {
-                const auto data_ps = node.get_ng_inputs().at(0)->get_output_partial_shape(0);
+                const auto data_ps = node.get_ng_inputs().at(0).get_partial_shape();
                 NGRAPH_CHECK(data_ps.rank().is_static(),
                              "Reduction operations input rank is required to be static");
 
index d04814f..aa06e79 100644 (file)
@@ -44,11 +44,11 @@ namespace ngraph
 
             // An overload for reduction operators that take reduction axes as input
             using RuntimeReductionFunction = std::function<std::shared_ptr<ngraph::Node>(
-                const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&, bool)>;
+                const Output<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&, bool)>;
 
             // An overload for reduction operators that take reduction axes as an attribute
             using ReductionFunction = std::function<std::shared_ptr<ngraph::Node>(
-                const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&)>;
+                const Output<ngraph::Node>&, const ngraph::AxisSet&)>;
 
             ///
             /// \brief      Create an nGraph version of an ONNX reduction operation.
@@ -62,7 +62,7 @@ namespace ngraph
             ///
             std::shared_ptr<ngraph::Node>
                 make_ng_reduction_op(const Node& node,
-                                     const std::shared_ptr<ngraph::Node>& ng_input,
+                                     const Output<ngraph::Node>& ng_input,
                                      ReductionFunction reduction_function);
 
             ///
@@ -77,7 +77,7 @@ namespace ngraph
             ///
             std::shared_ptr<ngraph::Node>
                 make_ng_reduction_op(const Node& node,
-                                     const std::shared_ptr<ngraph::Node>& ng_input,
+                                     const Output<ngraph::Node>& ng_input,
                                      RuntimeReductionFunction reduction_function);
 
         } // namespace  reduction
index 2615d45..bc07dc1 100644 (file)
@@ -87,10 +87,9 @@ namespace ngraph
                 return inferred_dims;
             }
 
-            std::shared_ptr<ngraph::Node>
-                interpret_as_scalar(const std::shared_ptr<ngraph::Node>& node)
+            Output<ngraph::Node> interpret_as_scalar(const Output<ngraph::Node>& node)
             {
-                Shape node_shape = node->get_shape();
+                Shape node_shape = node.get_shape();
 
                 // If node is already a scalar, return original
                 if (is_scalar(node_shape))
@@ -103,12 +102,13 @@ namespace ngraph
                              node_shape);
 
                 // If node is a Constant, recreate as Constant with Shape{}
-                if (ngraph::op::is_constant(node))
+                if (ngraph::op::is_constant(node.get_node()))
                 {
                     const auto value =
-                        ngraph::as_type_ptr<default_opset::Constant>(node)->get_data_ptr();
+                        ngraph::as_type_ptr<default_opset::Constant>(node.get_node_shared_ptr())
+                            ->get_data_ptr();
                     return std::make_shared<default_opset::Constant>(
-                        node->get_element_type(), ngraph::Shape{}, value);
+                        node.get_element_type(), ngraph::Shape{}, value);
                 }
 
                 return builder::opset1::reshape(node, Shape{});
index 8ec3569..242395f 100644 (file)
@@ -59,8 +59,7 @@ namespace ngraph
             ///
             /// \return     Original node or a node representing a reshape of the original.
             ///
-            std::shared_ptr<ngraph::Node>
-                interpret_as_scalar(const std::shared_ptr<ngraph::Node>& node);
+            Output<ngraph::Node> interpret_as_scalar(const Output<ngraph::Node>& node);
 
         } // namespace  reshape
     }     // namespace onnx_import
index ebc0803..f188c8c 100644 (file)
@@ -39,19 +39,18 @@ namespace ngraph
             ///
             /// \return nGraph node equivalent of the ONNX operation
             template <class T>
-            inline NodeVector
+            inline OutputVector
                 make_ng_variadic_op(const Node& node,
                                     const ngraph::op::AutoBroadcastSpec& auto_broadcast =
                                         ngraph::op::AutoBroadcastSpec::NUMPY)
             {
-                const NodeVector ng_inputs{node.get_ng_inputs()};
+                const OutputVector ng_inputs{node.get_ng_inputs()};
 
                 // Templated binary operation - Creates Add, Minimum, Maximum, etc.
-                const auto binary_operation =
-                    [&auto_broadcast](const std::shared_ptr<ngraph::Node>& arg0,
-                                      const std::shared_ptr<ngraph::Node>& arg1) {
-                        return std::make_shared<T>(arg0, arg1, auto_broadcast);
-                    };
+                const auto binary_operation = [&auto_broadcast](const Output<ngraph::Node>& arg0,
+                                                                const Output<ngraph::Node>& arg1) {
+                    return std::make_shared<T>(arg0, arg1, auto_broadcast);
+                };
 
                 // Create a result node as a series of binary operations
                 const auto result = std::accumulate(
index e640ba9..8b0f980 100644 (file)
@@ -766,7 +766,7 @@ NodeVector ngraph::as_node_vector(const OutputVector& values)
     NodeVector node_vector;
     for (auto& value : values)
     {
-        node_vector.push_back(value.as_single_output_node());
+        node_vector.emplace_back(value.get_node_shared_ptr());
     }
     return node_vector;
 }
index a27e991..ae907d6 100644 (file)
@@ -182,7 +182,7 @@ namespace ngraph
         ///
         /// \return A vector of nodes comprising the sub-graph. The order of output
         ///         tensors must match the match output tensors of the FusedOp
-        virtual NodeVector decompose_op() const { return NodeVector(); }
+        virtual OutputVector decompose_op() const { return OutputVector(); }
         /// Returns the NodeTypeInfo for the node's class.
         /// During transition to type_info, returns a dummy type_info for Node if the class
         /// has not been updated yet.
index d86383e..3d46833 100644 (file)
@@ -40,7 +40,7 @@ ngraph::op::v1::BatchToSpace::BatchToSpace(const ngraph::Output<ngraph::Node>& d
     constructor_validate_and_infer_types();
 }
 
-NodeVector op::v1::BatchToSpace::decompose_op() const
+OutputVector op::v1::BatchToSpace::decompose_op() const
 {
     auto data = input_value(0);
     auto block = input_value(1);
@@ -142,7 +142,7 @@ NodeVector op::v1::BatchToSpace::decompose_op() const
     vector<int64_t> end_mask(data_shape.size(), 0);
     flat_node = make_shared<op::v1::StridedSlice>(
         flat_node, crops_begin_const, upperbounds, begin_mask, end_mask);
-    return NodeVector{flat_node};
+    return OutputVector{flat_node};
 }
 
 void ngraph::op::v1::BatchToSpace::pre_validate_and_infer_types()
index 3283e49..b23f601 100644 (file)
@@ -55,7 +55,7 @@ namespace ngraph
                              const Output<Node>& crops_begin,
                              const Output<Node>& crops_end);
 
-                NodeVector decompose_op() const override;
+                OutputVector decompose_op() const override;
                 void pre_validate_and_infer_types() override;
                 std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index bd17668..2129733 100644 (file)
@@ -104,7 +104,7 @@ void op::Clamp::pre_validate_and_infer_types()
     set_output_type(0, get_input_element_type(0), get_input_partial_shape(0));
 }
 
-NodeVector op::Clamp::decompose_op() const
+OutputVector op::Clamp::decompose_op() const
 {
     const auto data = input_value(0);
     const auto type = data.get_element_type();
index 1e77514..b7c8c7b 100644 (file)
@@ -46,7 +46,7 @@ namespace ngraph
 
                 void pre_validate_and_infer_types() override;
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index e791d71..e4eb0be 100644 (file)
@@ -51,7 +51,7 @@ bool op::DepthToSpace::visit_attributes(AttributeVisitor& visitor)
     return true;
 }
 
-NodeVector op::DepthToSpace::decompose_op() const
+OutputVector op::DepthToSpace::decompose_op() const
 {
     auto data = input_value(0);
     auto data_shape = data.get_shape();
@@ -148,7 +148,7 @@ NodeVector op::DepthToSpace::decompose_op() const
     }
     flat_node = builder::opset1::reshape(flat_node, squeezed_shape);
 
-    return NodeVector{flat_node};
+    return OutputVector{flat_node};
 }
 
 shared_ptr<Node> op::DepthToSpace::clone_with_new_inputs(const OutputVector& new_args) const
index 43e19ba..44a1da0 100644 (file)
@@ -66,7 +66,7 @@ namespace ngraph
 
                 std::size_t get_block_size() const { return m_blocksize; }
                 DepthToSpaceMode get_mode() const { return m_mode; }
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index fd57fc0..1c142db 100644 (file)
@@ -88,7 +88,7 @@ bool ngraph::op::v0::FakeQuantize::visit_attributes(AttributeVisitor& visitor)
     return true;
 }
 
-NodeVector op::FakeQuantize::decompose_op() const
+OutputVector op::FakeQuantize::decompose_op() const
 {
     Output<Node> data{input_value(0)};
     Output<Node> input_low{input_value(1)};
index 62ca798..72fb789 100644 (file)
@@ -67,7 +67,7 @@ namespace ngraph
                                  AutoBroadcastSpec(AutoBroadcastType::NUMPY));
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual void validate_and_infer_types() override;
 
                 virtual std::shared_ptr<Node>
index 42762f3..9ef04d0 100644 (file)
@@ -43,7 +43,7 @@ bool ngraph::op::v0::Gelu::visit_attributes(AttributeVisitor& visitor)
 }
 
 // f(x) = 0.5 * x * (1.0 + erf( x / sqrt(2.0) )
-NodeVector op::Gelu::decompose_op() const
+OutputVector op::Gelu::decompose_op() const
 {
     auto data = input_value(0);
 
index bb7d5a1..ed6a50b 100644 (file)
@@ -40,7 +40,7 @@ namespace ngraph
                 Gelu(const Output<Node>& data);
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 void pre_validate_and_infer_types() override;
 
index 40be11f..5aa3070 100644 (file)
@@ -62,7 +62,7 @@ void op::GRN::pre_validate_and_infer_types()
     }
 }
 
-NodeVector op::GRN::decompose_op() const
+OutputVector op::GRN::decompose_op() const
 {
     Output<Node> data{input_value(0)};
     const Shape& input_shape{data.get_shape()};
@@ -88,7 +88,7 @@ NodeVector op::GRN::decompose_op() const
         data = builder::reshape(data, input_shape);
     }
 
-    return as_node_vector({data});
+    return OutputVector{data};
 }
 
 shared_ptr<Node> op::GRN::clone_with_new_inputs(const OutputVector& new_args) const
index 1e9f9f2..1d5e3f3 100644 (file)
@@ -45,7 +45,7 @@ namespace ngraph
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 float get_bias() const { return m_bias; }
                 virtual void pre_validate_and_infer_types() override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index 85899e7..4fde24d 100644 (file)
@@ -168,7 +168,7 @@ void op::v3::GRUCell::pre_validate_and_infer_types()
         ".");
 }
 
-NodeVector op::v3::GRUCell::decompose_op() const
+OutputVector op::v3::GRUCell::decompose_op() const
 {
     // ------ VARIABLE'S NAMES AND ACRONYM DEFINITIONS ------
     // The names used below are analogous to the one used in ONNX documentation.
@@ -218,10 +218,10 @@ NodeVector op::v3::GRUCell::decompose_op() const
     auto Ht_R = make_shared<op::Dot>(H_t, R_transpose);
 
     // split to gates:
-    NodeVector Xt_W_zrh = builder::split(Xt_W, 3, 1);
-    NodeVector R_zrh = builder::split(R_transpose, 3, 1);
-    NodeVector Ht_R_zrh = builder::split(Ht_R, 3, 1);
-    NodeVector biases_zrh = m_linear_before_reset ? builder::split(B, 4) : builder::split(B, 3);
+    OutputVector Xt_W_zrh = builder::split(Xt_W, 3, 1);
+    OutputVector R_zrh = builder::split(R_transpose, 3, 1);
+    OutputVector Ht_R_zrh = builder::split(Ht_R, 3, 1);
+    OutputVector biases_zrh = m_linear_before_reset ? builder::split(B, 4) : builder::split(B, 3);
 
     // zt = f(Xt*(Wz^T) + Ht-1*(Rz^T) + Wbz + Rbz)
     auto z_t = m_activation_f(clip(add(Xt_W_zrh[0], add(Ht_R_zrh[0], biases_zrh[0]))));
index 0d438c0..969f761 100644 (file)
@@ -149,7 +149,7 @@ namespace ngraph
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 virtual void pre_validate_and_infer_types() override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
 
index fad4cc3..4988f1c 100644 (file)
@@ -75,7 +75,7 @@ void op::HardSigmoid::pre_validate_and_infer_types()
         "The element types of both alpha and beta inputs must match the data input type.");
 }
 
-NodeVector op::HardSigmoid::decompose_op() const
+OutputVector op::HardSigmoid::decompose_op() const
 {
     const auto data = input_value(0);
 
index 42b7978..f81d1c7 100644 (file)
@@ -47,7 +47,7 @@ namespace ngraph
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 virtual void pre_validate_and_infer_types() override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
             };
index 8241e32..777c53f 100644 (file)
@@ -224,7 +224,7 @@ void op::LSTMCell::pre_validate_and_infer_types()
                           ".");
 }
 
-NodeVector op::LSTMCell::decompose_op() const
+OutputVector op::LSTMCell::decompose_op() const
 {
     // ------ VARIABLE'S NAMES AND ACRONYM DEFINITIONS ------
     // The names used below are analogous to the one used in ONNX documentation.
@@ -270,7 +270,7 @@ NodeVector op::LSTMCell::decompose_op() const
     Output<Node> W = input_value(3);
     Output<Node> R = input_value(4);
     Output<Node> bias = input_value(5);
-    NodeVector p_iof = builder::split(input_value(6), s_peepholes_count);
+    OutputVector p_iof = builder::split(input_value(6), s_peepholes_count);
 
     // Converting to IFCO format since it's DNNL default.
     if (m_weights_format != op::LSTMWeightsFormat::IFCO)
@@ -291,7 +291,7 @@ NodeVector op::LSTMCell::decompose_op() const
     // Xt*(W^T) + Ht-1*(R^T) + Wb + Rb  -- for [iofc] gates.
     auto gates = add(Xt_W, add(Ht_R, bias));
 
-    NodeVector split_gates = builder::split(gates, 4, -1);
+    OutputVector split_gates = builder::split(gates, 4, -1);
     auto i_t = split_gates.at(0);
     auto f_t = split_gates.at(1);
     auto c_t = split_gates.at(2);
@@ -302,9 +302,9 @@ NodeVector op::LSTMCell::decompose_op() const
     if (m_input_forget)
     {
         // Couple input with forget gate: 1 - i_t
-        f_t = sub(op::Constant::create(i_t->get_element_type(),
-                                       i_t->get_shape(),
-                                       vector<float>(shape_size(i_t->get_shape()), 1.f)),
+        f_t = sub(op::Constant::create(i_t.get_element_type(),
+                                       i_t.get_shape(),
+                                       vector<float>(shape_size(i_t.get_shape()), 1.f)),
                   i_t);
     }
     else
@@ -344,8 +344,8 @@ shared_ptr<Node> op::LSTMCell::convert_node_format(const Output<Node>& node) con
         {op::LSTMWeightsFormat::IOFC, {0, 2, 3, 1}},
     };
 
-    NodeVector splitted_node = builder::split(node, s_gates_count);
-    NodeVector nodes_in_new_format;
+    OutputVector splitted_node = builder::split(node, s_gates_count);
+    OutputVector nodes_in_new_format;
     nodes_in_new_format.reserve(s_gates_count);
     for (const auto& axis : gate_order_conversion_map.at(m_weights_format))
     {
index 7a25701..0b9151f 100644 (file)
@@ -214,7 +214,7 @@ namespace ngraph
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 virtual void pre_validate_and_infer_types() override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
 
index 86eafe0..94daf30 100644 (file)
@@ -40,26 +40,26 @@ bool ngraph::op::v0::LSTMSequence::visit_attributes(AttributeVisitor& visitor)
     visitor.on_attribute("weights_format", m_weights_format);
     return true;
 }
-NodeVector op::v0::LSTMSequence::decompose_op() const
+OutputVector op::v0::LSTMSequence::decompose_op() const
 {
-    NodeVector results;
+    OutputVector results;
     if (m_direction == direction::FORWARD || m_direction == direction::REVERSE)
     {
         results = lstm_pass(m_direction == direction::REVERSE);
     }
     if (m_direction == direction::BIDIRECTIONAL)
     {
-        NodeVector fwd_results{lstm_pass()};
-        NodeVector rev_results{lstm_pass(true)};
+        OutputVector fwd_results{lstm_pass()};
+        OutputVector rev_results{lstm_pass(true)};
 
         // Stack together respective outputs from both forward and reverse passess.
         shared_ptr<Node> Y{
-            make_shared<opset1::Concat>(NodeVector{fwd_results.at(0), rev_results.at(0)}, 1)};
+            make_shared<opset1::Concat>(OutputVector{fwd_results.at(0), rev_results.at(0)}, 1)};
         shared_ptr<Node> Y_h{
-            make_shared<opset1::Concat>(NodeVector{fwd_results.at(1), rev_results.at(1)}, 1)};
+            make_shared<opset1::Concat>(OutputVector{fwd_results.at(1), rev_results.at(1)}, 1)};
         shared_ptr<Node> Y_c{
-            make_shared<opset1::Concat>(NodeVector{fwd_results.at(2), rev_results.at(2)}, 1)};
-        results = NodeVector{Y, Y_h, Y_c};
+            make_shared<opset1::Concat>(OutputVector{fwd_results.at(2), rev_results.at(2)}, 1)};
+        results = OutputVector{Y, Y_h, Y_c};
     }
     return results;
 }
@@ -141,7 +141,7 @@ shared_ptr<Node> op::v0::LSTMSequence::get_masked_node(const Output<Node>& data,
     return make_shared<opset1::Select>(mask_condition, mask_value, data);
 }
 
-NodeVector op::v0::LSTMSequence::lstm_pass(bool is_reverse) const
+OutputVector op::v0::LSTMSequence::lstm_pass(bool is_reverse) const
 {
     // ------ VARIABLE'S NAMES AND ACRONYM DEFINITIONS ------
     // The names used below are analogous to the one used in ONNX documentation.
@@ -178,7 +178,7 @@ NodeVector op::v0::LSTMSequence::lstm_pass(bool is_reverse) const
         X = make_shared<opset1::ReverseSequence>(X, seq_lengths, 0 /*batch_axis*/, 1 /*seq_axis*/);
     }
 
-    NodeVector in_seqs = builder::opset1::split(X, X->get_shape().at(1), 1);
+    OutputVector in_seqs = builder::opset1::split(X, X->get_shape().at(1), 1);
 
     for (auto& in_x : in_seqs)
     {
@@ -247,7 +247,7 @@ shared_ptr<Node> op::v0::LSTMSequence::prepare_input(Output<Node> node,
                                                      size_t num_direction_axis) const
 {
     // In bidirectional mode inputs are stacked together, so we must split them.
-    shared_ptr<Node> tmp = node.get_node_shared_ptr();
+    Output<Node> tmp = node;
     if (m_direction == direction::BIDIRECTIONAL)
     {
         tmp = builder::opset1::split(node, 2, num_direction_axis).at(is_reverse ? 1 : 0);
index b64ff62..b121a06 100644 (file)
@@ -133,7 +133,7 @@ namespace ngraph
                 }
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
@@ -166,7 +166,7 @@ namespace ngraph
                                     std::size_t batch_axis = 0,
                                     const Output<Node>& default_value = Output<Node>()) const;
 
-                NodeVector lstm_pass(bool is_reverse = false) const;
+                OutputVector lstm_pass(bool is_reverse = false) const;
 
                 // Split(bi-directional) and squeeze input data to remove 'num_direction' dimension.
                 std::shared_ptr<Node> prepare_input(Output<Node> node,
index f875ba8..68df2be 100644 (file)
@@ -68,7 +68,7 @@ void op::MatMul::pre_validate_and_infer_types()
     }
 }
 
-NodeVector op::MatMul::decompose_op() const
+OutputVector op::MatMul::decompose_op() const
 {
     auto A = input_value(0);
     auto B = input_value(1);
index 8839704..0be3a3d 100644 (file)
@@ -47,7 +47,7 @@ namespace ngraph
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 virtual void pre_validate_and_infer_types() override;
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index 4fa61fb..3593b5b 100644 (file)
@@ -42,7 +42,7 @@ bool ngraph::op::v1::Mod::visit_attributes(AttributeVisitor& visitor)
     return true;
 }
 
-NodeVector op::v1::Mod::decompose_op() const
+OutputVector op::v1::Mod::decompose_op() const
 {
     const auto dividend = make_shared<op::Abs>(input_value(0));
     const auto dividend_sign = make_shared<op::Sign>(input_value(0));
index 002c273..f359781 100644 (file)
@@ -44,7 +44,7 @@ namespace ngraph
                     const AutoBroadcastSpec& auto_broadcast = AutoBroadcastType::NUMPY);
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index f712a47..04621a7 100644 (file)
@@ -70,7 +70,7 @@ void op::MVN::validate_and_infer_types()
     set_output_type(0, get_input_element_type(0), get_input_partial_shape(0));
 }
 
-NodeVector op::MVN::decompose_op() const
+OutputVector op::MVN::decompose_op() const
 {
     auto data = input_value(0);
     auto data_shape = data.get_shape(); // assume that data has n and c channels.
@@ -95,7 +95,7 @@ NodeVector op::MVN::decompose_op() const
         variance = variance + eps_node;
         variance = std::make_shared<op::Broadcast>(variance, data_shape, m_reduction_axes);
 
-        return as_node_vector({mean_normalization / variance});
+        return OutputVector{mean_normalization / variance};
     }
 }
 
index cb35be2..6e87eb5 100644 (file)
@@ -63,7 +63,7 @@ namespace ngraph
                     bool normalize_variance = true,
                     double eps = 1e-9);
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual void validate_and_infer_types() override;
 
index ebf0b92..8e5b3a7 100644 (file)
@@ -95,7 +95,7 @@ AxisSet op::NormalizeL2::get_reduction_axes() const
     return axes;
 }
 
-NodeVector op::NormalizeL2::decompose_op() const
+OutputVector op::NormalizeL2::decompose_op() const
 {
     Output<Node> data{input_value(0)};
     const Shape input_shape{data.get_shape()};
@@ -108,7 +108,7 @@ NodeVector op::NormalizeL2::decompose_op() const
 
     data = make_shared<op::Divide>(data, norm, AutoBroadcastSpec(AutoBroadcastType::NUMPY));
 
-    return as_node_vector({data});
+    return OutputVector{data};
 }
 
 shared_ptr<Node> op::NormalizeL2::clone_with_new_inputs(const OutputVector& new_args) const
index 06a1bce..938c974 100644 (file)
@@ -55,7 +55,7 @@ namespace ngraph
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 float get_eps() const { return m_eps; }
                 EpsMode get_eps_mode() const { return m_eps_mode; }
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual void pre_validate_and_infer_types() override;
                 AxisSet get_reduction_axes() const;
 
index 31309ca..873b3eb 100644 (file)
@@ -46,7 +46,7 @@ void ngraph::op::v0::PRelu::pre_validate_and_infer_types()
     set_output_type(0, get_input_element_type(0), get_input_partial_shape(0));
 }
 
-NodeVector op::PRelu::decompose_op() const
+OutputVector op::PRelu::decompose_op() const
 {
     auto data = input_value(0);
     auto data_shape = data.get_shape();
index 9c5011f..b2ac26f 100644 (file)
@@ -43,7 +43,7 @@ namespace ngraph
                 PRelu(const Output<Node>& data, const Output<Node>& slope);
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index 5485ff1..822eaa0 100644 (file)
@@ -146,7 +146,7 @@ void op::RNNCell::pre_validate_and_infer_types()
                           ".");
 }
 
-NodeVector op::RNNCell::decompose_op() const
+OutputVector op::RNNCell::decompose_op() const
 {
     // ------ VARIABLE'S NAMES AND ACRONYM DEFINITIONS ------
     // The names used below are analogous to the one used in ONNX documentation.
index 2040a56..a0e3dab 100644 (file)
@@ -129,7 +129,7 @@ namespace ngraph
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 virtual void pre_validate_and_infer_types() override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
 
index dd4e3cd..372282f 100644 (file)
@@ -39,7 +39,7 @@ bool ngraph::op::v0::Selu::visit_attributes(AttributeVisitor& visitor)
     return true;
 }
 
-NodeVector op::v0::Selu::decompose_op() const
+OutputVector op::v0::Selu::decompose_op() const
 {
     const auto data = input_value(0);
     const auto alpha = input_value(1);
index 15c2be8..4cdd6f9 100644 (file)
@@ -43,7 +43,7 @@ namespace ngraph
                      const Output<Node>& lambda);
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index 34d345f..ca1ded0 100644 (file)
@@ -85,7 +85,7 @@ void op::ShuffleChannels::pre_validate_and_infer_types()
     }
 }
 
-NodeVector op::ShuffleChannels::decompose_op() const
+OutputVector op::ShuffleChannels::decompose_op() const
 {
     const auto data = input_value(0);
     const auto& data_shape = data.get_shape();
index 3399599..14720ea 100644 (file)
@@ -53,7 +53,7 @@ namespace ngraph
 
                 virtual void pre_validate_and_infer_types() override;
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index fc0cbbd..55728d5 100644 (file)
@@ -39,7 +39,7 @@ ngraph::op::v1::SpaceToBatch::SpaceToBatch(const ngraph::Output<ngraph::Node>& d
     constructor_validate_and_infer_types();
 }
 
-NodeVector op::v1::SpaceToBatch::decompose_op() const
+OutputVector op::v1::SpaceToBatch::decompose_op() const
 {
     auto data = input_value(0);
     auto block = input_value(1);
@@ -125,7 +125,7 @@ NodeVector op::v1::SpaceToBatch::decompose_op() const
     }
     flat_node = builder::opset1::reshape(flat_node, squeezed_shape);
 
-    return NodeVector{flat_node};
+    return OutputVector{flat_node};
 }
 
 void ngraph::op::v1::SpaceToBatch::pre_validate_and_infer_types()
index fe03dc5..cd32661 100644 (file)
@@ -56,7 +56,7 @@ namespace ngraph
                              const Output<ngraph::Node>& pads_begin,
                              const Output<ngraph::Node>& pads_end);
 
-                NodeVector decompose_op() const override;
+                OutputVector decompose_op() const override;
                 void pre_validate_and_infer_types() override;
                 std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index 2b6fa47..4a3f9ab 100644 (file)
@@ -49,7 +49,7 @@ bool ngraph::op::v0::SpaceToDepth::visit_attributes(AttributeVisitor& visitor)
     return true;
 }
 
-NodeVector op::SpaceToDepth::decompose_op() const
+OutputVector op::SpaceToDepth::decompose_op() const
 {
     auto data = input_value(0);
     auto data_shape = data.get_shape();
@@ -138,7 +138,7 @@ NodeVector op::SpaceToDepth::decompose_op() const
     squeezed_shape.insert(squeezed_shape.begin() + 1, c_dim * std::pow(m_blocksize, spatial_dims));
     flat_node = builder::opset1::reshape(flat_node, squeezed_shape);
 
-    return NodeVector{flat_node};
+    return OutputVector{flat_node};
 }
 
 shared_ptr<Node> op::SpaceToDepth::clone_with_new_inputs(const OutputVector& new_args) const
index 03dabd8..8198815 100644 (file)
@@ -63,7 +63,7 @@ namespace ngraph
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 std::size_t get_block_size() const { return m_blocksize; }
                 SpaceToDepthMode get_mode() const { return m_mode; }
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index 9479f86..afe70f3 100644 (file)
@@ -41,7 +41,7 @@ bool ngraph::op::v0::SquaredDifference::visit_attributes(AttributeVisitor& visit
     return true;
 }
 
-NodeVector op::SquaredDifference::decompose_op() const
+OutputVector op::SquaredDifference::decompose_op() const
 {
     const auto x1 = input_value(0);
     const auto x2 = input_value(1);
index 76407f9..9ab6409 100644 (file)
@@ -46,7 +46,7 @@ namespace ngraph
                     const AutoBroadcastSpec& auto_broadcast = AutoBroadcastType::NUMPY);
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index 5af76f2..c5ec301 100644 (file)
@@ -112,7 +112,7 @@ bool ngraph::op::v0::Squeeze::visit_attributes(AttributeVisitor& visitor)
     return true;
 }
 
-NodeVector op::Squeeze::decompose_op() const
+OutputVector op::Squeeze::decompose_op() const
 {
     NODE_VALIDATION_CHECK(
         this,
index fec7ab9..2eaee9b 100644 (file)
@@ -38,7 +38,7 @@ namespace ngraph
                 Squeeze(const Output<Node>& data, const Output<Node>& axes);
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual void pre_validate_and_infer_types() override;
                 bool evaluate(const HostTensorVector& outputs,
                               const HostTensorVector& inputs) override;
index bfee1c9..b5f2caa 100644 (file)
@@ -63,7 +63,7 @@ void op::Stack::pre_validate_and_infer_types()
     }
 }
 
-NodeVector op::Stack::decompose_op() const
+OutputVector op::Stack::decompose_op() const
 {
     auto axis = get_axis();
     std::vector<std::shared_ptr<ngraph::Node>> args;
index acef443..1c307d0 100644 (file)
@@ -50,7 +50,7 @@ namespace ngraph
 
                 virtual void pre_validate_and_infer_types() override;
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index c4b02a1..87809d5 100644 (file)
@@ -75,7 +75,7 @@ void op::Unsqueeze::pre_validate_and_infer_types()
     set_output_type(0, get_input_element_type(0), PartialShape{output_shape});
 }
 
-NodeVector op::Unsqueeze::decompose_op() const
+OutputVector op::Unsqueeze::decompose_op() const
 {
     NODE_VALIDATION_CHECK(
         this,
index 9e2b564..77c1da8 100644 (file)
@@ -38,7 +38,7 @@ namespace ngraph
                 Unsqueeze(const Output<Node>& data, const Output<Node>& axes);
 
                 virtual void pre_validate_and_infer_types() override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 bool evaluate(const HostTensorVector& outputs,
index b198272..3744e43 100644 (file)
@@ -497,7 +497,7 @@ void op::v1::GroupConvolutionBackpropData::pre_validate_and_infer_types()
     set_output_type(0, result_et, output_pshape);
 }
 
-NodeVector op::v1::GroupConvolutionBackpropData::decompose_op() const
+OutputVector op::v1::GroupConvolutionBackpropData::decompose_op() const
 {
     auto data = input_value(0);
     auto filters = input_value(1);
@@ -505,16 +505,15 @@ NodeVector op::v1::GroupConvolutionBackpropData::decompose_op() const
 
     auto groups = filters.get_shape()[0];
     // slice data
-    auto sliced_data = builder::split(data, groups, 1);
+    OutputVector sliced_data = builder::split(data, groups, 1);
     // slice filters
-    auto sliced_filters = builder::split(filters, groups, 0);
+    OutputVector sliced_filters = builder::split(filters, groups, 0);
     // We have to squeeze first empty dimension (groups).
-    std::transform(std::begin(sliced_filters),
-                   std::end(sliced_filters),
-                   std::begin(sliced_filters),
-                   [](const std::shared_ptr<Node>& n) -> std::shared_ptr<Node> {
-                       return builder::opset1::squeeze(n);
-                   });
+    std::transform(
+        std::begin(sliced_filters),
+        std::end(sliced_filters),
+        std::begin(sliced_filters),
+        [](const Output<Node>& n) -> Output<Node> { return builder::opset1::squeeze(n); });
 
     for (auto i = 0; i < groups; ++i)
     {
@@ -736,7 +735,7 @@ shared_ptr<Node> op::v0::GroupConvolution::clone_with_new_inputs(const OutputVec
     }
 }
 
-NodeVector op::v0::GroupConvolution::decompose_op() const
+OutputVector op::v0::GroupConvolution::decompose_op() const
 {
     auto data = input_value(0);
     auto filters = input_value(1);
@@ -757,7 +756,7 @@ NodeVector op::v0::GroupConvolution::decompose_op() const
             // Remove group dimmension after slicing
             sliced_filter = make_shared<op::Reshape>(
                 sliced_filters[group],
-                get_default_order(sliced_filters[group]->get_shape().size()),
+                get_default_order(sliced_filters[group].get_shape().size()),
                 Shape(std::next(std::begin(filters_shape), 1), std::end(filters_shape)));
         }
         convolution_nodes.push_back(
@@ -843,7 +842,7 @@ shared_ptr<Node>
                                                              get_groups());
 }
 
-NodeVector op::v0::GroupConvolutionBackpropData::decompose_op() const
+OutputVector op::v0::GroupConvolutionBackpropData::decompose_op() const
 {
     auto filters = input_value(1);
     auto output_delta = input_value(2);
index e8c64ef..bd2cb15 100644 (file)
@@ -208,7 +208,7 @@ namespace ngraph
 
                 bool visit_attributes(AttributeVisitor& visitor) override;
                 virtual bool is_dynamic() const override;
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
                 virtual void pre_validate_and_infer_types() override;
 
                 virtual std::shared_ptr<Node>
@@ -296,7 +296,7 @@ namespace ngraph
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual void pre_validate_and_infer_types() override;
                 virtual void post_validate_and_infer_types() override;
@@ -345,7 +345,7 @@ namespace ngraph
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual void pre_validate_and_infer_types() override;
 
index 828fd99..636ad6f 100644 (file)
@@ -104,7 +104,7 @@ void op::v0::Split::pre_validate_and_infer_types()
     set_input_is_relevant_to_shape(0);
 }
 
-NodeVector op::v0::Split::decompose_op() const
+OutputVector op::v0::Split::decompose_op() const
 {
     return builder::split(input_value(0), m_splits, m_axis);
 }
index 0c0b496..4a60914 100644 (file)
@@ -60,7 +60,7 @@ namespace ngraph
 
                 void pre_validate_and_infer_types() override;
 
-                virtual NodeVector decompose_op() const override;
+                virtual OutputVector decompose_op() const override;
 
                 virtual std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
index e5c38e9..75a4ac2 100644 (file)
@@ -387,10 +387,10 @@ Output<Node> op::v0::TensorIterator::get_concatenated_slices(const Output<Node>&
     return Output<Node>(shared_from_this(), output_index);
 }
 
-NodeVector op::v0::TensorIterator::decompose_op() const
+OutputVector op::v0::TensorIterator::decompose_op() const
 {
     // Stub
-    return NodeVector{};
+    return OutputVector{};
 }
 
 void op::v0::TensorIterator::revalidate_and_infer_types_for_body_ops()
index b3c262d..30165df 100644 (file)
@@ -324,7 +324,7 @@ namespace ngraph
 
                 std::shared_ptr<Node>
                     clone_with_new_inputs(const OutputVector& new_args) const override;
-                NodeVector decompose_op() const override;
+                OutputVector decompose_op() const override;
                 /// \return the body of the iteration
                 std::shared_ptr<BodyLambda> get_body() const { return m_body; }
                 /// \param body set the body of the iteration
index 94743a3..e45adc2 100644 (file)
@@ -43,21 +43,18 @@ void op::util::FusedOp::validate_and_infer_types()
     NodeVector nodes;
     for (auto& val : input_values())
         nodes.emplace_back(val.get_node_shared_ptr());
-    auto subgraph = extract_subgraph(subgraph_outputs, nodes);
+    auto subgraph = extract_subgraph(ngraph::as_node_vector(subgraph_outputs), nodes);
     validate_nodes_and_infer_types(subgraph);
 
     size_t i = 0;
-    for (auto output_node : subgraph_outputs)
+    for (auto output : subgraph_outputs)
     {
-        for (size_t j = 0; j < output_node->get_output_size(); j++, i++)
+        if (i >= get_output_size())
         {
-            if (i >= get_output_size())
-            {
-                set_output_size(i + 1);
-            }
-            set_output_type(
-                i, output_node->get_output_element_type(j), output_node->get_output_shape(j));
+            set_output_size(i + 1);
         }
+        set_output_type(i, output.get_element_type(), output.get_shape());
+        i++;
     }
 
     post_validate_and_infer_types();
index 68d1cbc..275eef4 100644 (file)
@@ -69,11 +69,11 @@ void pass::ConstantFolding::construct_constant_split()
         int index = 0;
         for (auto& output : split->outputs())
         {
-            output.replace(slices[index++]->output(0));
+            output.replace(slices[index++]);
         }
         split->outputs().clear();
 
-        for (auto& slice : slices)
+        for (auto& slice : as_node_vector(slices))
         {
             auto const_data = std::dynamic_pointer_cast<op::Constant>(
                 slice->input_value(0).get_node_shared_ptr());
index 1428768..5a5be23 100644 (file)
@@ -99,12 +99,12 @@ void pass::ConstantFolding::construct_constant_variadic_split()
         {
             for (auto& input : variadic_split->output(i).get_target_inputs())
             {
-                input.replace_source_output((slices[i]->output(0)));
+                input.replace_source_output(slices[i]);
             }
         }
         variadic_split->outputs().clear();
 
-        for (auto& slice : slices)
+        for (auto& slice : as_node_vector(slices))
         {
             auto const_data = std::dynamic_pointer_cast<op::Constant>(
                 slice->input_value(0).get_node_shared_ptr());
index c989856..5b77b33 100644 (file)
@@ -195,14 +195,14 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_add_abc_initializers)
 NGRAPH_TEST(${BACKEND_NAME}, onnx_model_override_op)
 {
     onnx_import::register_operator(
-        "FalseAdd", 1, "", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
+        "FalseAdd", 1, "", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
             return {std::make_shared<ngraph::op::Add>(ng_inputs.at(0), ng_inputs.at(1))};
         });
 
     onnx_import::register_operator(
-        "FalseAdd", 1, "", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
+        "FalseAdd", 1, "", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
             return {std::make_shared<ngraph::op::Subtract>(ng_inputs.at(0), ng_inputs.at(1))};
         });
 
@@ -257,8 +257,8 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_unsupported_op)
 NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op)
 {
     onnx_import::register_operator(
-        "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
+        "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
             return {std::make_shared<ngraph::op::Add>(ng_inputs.at(0), ng_inputs.at(1))};
         });
 
@@ -274,8 +274,8 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op)
 NGRAPH_TEST(${BACKEND_NAME}, onnx_model_custom_op_default_domain)
 {
     onnx_import::register_operator(
-        "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
+        "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
             return {std::make_shared<ngraph::op::Add>(ng_inputs.at(0), ng_inputs.at(1))};
         });
 
@@ -312,8 +312,8 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_is_op_supported)
 
     // Registered custom operator
     onnx_import::register_operator(
-        "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
+        "AddQ", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
             return {std::make_shared<ngraph::op::Add>(ng_inputs.at(0), ng_inputs.at(1))};
         });
     EXPECT_TRUE(onnx_import::is_operator_supported("AddQ", 1, "com.intel.ai"));
@@ -322,8 +322,8 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_is_op_supported)
 NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_op_domain)
 {
     onnx_import::register_operator(
-        "CustomAdd", 1, "custom.op", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
+        "CustomAdd", 1, "custom.op", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
             return {std::make_shared<ngraph::op::Add>(ng_inputs.at(0), ng_inputs.at(1))};
         });
 
@@ -370,11 +370,11 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_op_in_unknown_domain)
 NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_input)
 {
     onnx_import::register_operator(
-        "TestMissingInOut", 1, "com.intel.ai", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
-            std::shared_ptr<ngraph::Node> A = ng_inputs.at(0);
-            std::shared_ptr<ngraph::Node> B = ng_inputs.at(1);
-            std::shared_ptr<ngraph::Node> C = ng_inputs.at(2);
+        "TestMissingInOut", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
+            Output<ngraph::Node> A = ng_inputs.at(0);
+            Output<ngraph::Node> B = ng_inputs.at(1);
+            Output<ngraph::Node> C = ng_inputs.at(2);
 
             A = A * C;
             if (!ngraph::op::is_null(B))
@@ -387,8 +387,8 @@ NGRAPH_TEST(${BACKEND_NAME}, onnx_model_missing_input)
         });
 
     onnx_import::register_operator(
-        "TestMissingIn", 1, "com.intel.ai", [](const onnx_import::Node& node) -> NodeVector {
-            NodeVector ng_inputs{node.get_ng_inputs()};
+        "TestMissingIn", 1, "com.intel.ai", [](const onnx_import::Node& node) -> OutputVector {
+            OutputVector ng_inputs{node.get_ng_inputs()};
             std::shared_ptr<ngraph::Node> result = std::make_shared<ngraph::op::Constant>(
                 element::f32, ngraph::Shape{2, 2}, std::vector<float>{1, 1, 1, 1});
 
index 9a8aa8a..fcc1b5c 100644 (file)
@@ -523,9 +523,8 @@ TEST(provenance, scaled_quantize_concat_unsigned)
     An->add_provenance_tag("in1");
     Ax->add_provenance_tag("in2");
     ngraph::Shape shape_r{2, 2};
-    auto QConcat = ngraph::builder::QuantizedConcatBuilder(
-        ngraph::NodeVector{A}, 0, ngraph::NodeVector{An}, ngraph::NodeVector{Ax});
-    auto f = make_shared<ngraph::Function>(ngraph::NodeVector{QConcat},
+    auto QConcat = ngraph::builder::QuantizedConcatBuilder({A}, 0, {An}, {Ax});
+    auto f = make_shared<ngraph::Function>(ngraph::OutputVector{QConcat},
                                            ngraph::ParameterVector{A, An, Ax});
     QConcat->add_provenance_tag("hello");
     auto check_if_result = [](shared_ptr<Node> n) {
index b98d182..545b1b8 100644 (file)
@@ -38,7 +38,9 @@ bool pass::FusedOpDecomposition::run_on_node(shared_ptr<Node> node)
             // Op supported by backend. Do not decompose
             return modified;
         }
-        auto subgraph_outputs = node->decompose_op();
+
+        OutputVector output_vector = node->decompose_op();
+        NodeVector subgraph_outputs = as_node_vector(output_vector);
 
         if (ngraph::get_provenance_enabled())
         {
@@ -56,10 +58,7 @@ bool pass::FusedOpDecomposition::run_on_node(shared_ptr<Node> node)
         }
 
         // Run recursively until no more fused ops
-        NodeVector nodes;
-        for (auto& val : node->input_values())
-            nodes.emplace_back(val.get_node_shared_ptr());
-        auto subgraph = extract_subgraph(subgraph_outputs, nodes);
+        auto subgraph = extract_subgraph(subgraph_outputs, as_node_vector(node->input_values()));
         for (auto subgraph_node : subgraph)
         {
             run_on_node(subgraph_node);