Files
openvino/docs/snippets/ngraph.cpp
Ilya Churaev ea04f8217d Mark as deprecated nGraph API (#17647)
* Mark as deprecated nGraph API

* Fixed code style

* Added IN_OV_LIBRARY define

* Suppress warnings for log

* Suppress warning

* Updated nGraph headers

* Fixed build for macOS

* Fixed lpt and snippets

* Fixed build all on macOS

* Suppress some warnings

* Fixed some new warnings

* Fixed new warnings

* Try to fix some warnings

* More warnings

* Soome change

* Suppress more warnings

* Suppress warnings for transformations

* Suppress warnings for LPT

* One more fix

* Suppress more warnings

* Try to fix opset error

* Remove opset constructor

* Cannot fix opset warning

* Suppress warnings for offline transfromations

* Fixed some warnings for Windows

* Fixed code style

* Suppress some warnings for onnx FE

* Revert "Suppress some warnings for onnx FE"

This reverts commit 75d23b64fc.

* Revert "Fixed code style"

This reverts commit c6eba63116.

* Revert "Fixed some warnings for Windows"

This reverts commit 23d7ed88b6.

* Revert "Suppress warnings for offline transfromations"

This reverts commit 0b9f6317bf.

* Revert "Cannot fix opset warning"

This reverts commit 19ea658639.

* Revert "Remove opset constructor"

This reverts commit 06afb1bc20.

* Revert "Suppress warnings for LPT"

This reverts commit 58b1c0f5a0.

* Revert "Suppress warnings for transformations"

This reverts commit f8bb9814a1.

* Revert "Suppress more warnings"

This reverts commit f9f0da9acb.

* Revert "Soome change"

This reverts commit e545d4984e.

* Remove deprecation for ngraph::OpSet and FactoryRegistry
2023-06-01 12:44:28 +04:00

46 lines
1.7 KiB
C++

// Copyright (C) 2018-2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include <openvino/opsets/opset8.hpp>
int main() {
//! [ngraph:graph]
// _____________ _____________
// | Parameter | | Parameter |
// | data1 | | data2 |
// |___________| |___________|
// | |
// data1_t | | data2_t
// \ /
// \ /
// \ /
// ____\____/____
// | Concat |
// | concat |
// |____________|
// |
// | concat_t
// |
// _______|_______
// | Result |
// | result |
// |_____________|
auto data1 = std::make_shared<ov::opset8::Parameter>(ov::element::i64, ov::Shape{1, 3, 2, 2});
data1->set_friendly_name("data1"); // operation name
data1->output(0).set_names({"data1_t"}); // tensor names
auto data2 = std::make_shared<ov::opset8::Parameter>(ov::element::i64, ov::Shape{1, 2, 2, 2});
data2->set_friendly_name("data2"); // operation name
data2->output(0).set_names({"data2_t"}); // tensor names
auto concat = std::make_shared<ov::opset8::Concat>(ov::OutputVector{data1, data2}, 1);
concat->set_friendly_name("concat"); // operation name
concat->output(0).set_names({"concat_t"}); // tensor name
auto result = std::make_shared<ov::opset8::Result>(concat);
result->set_friendly_name("result"); // operation name
auto f = std::make_shared<ov::Model>(ov::ResultVector{result}, ov::ParameterVector{data1, data2}, "function_name");
//! [ngraph:graph]
return 0;
}