Files
openvino/docs/nGraph_DG/nGraph_basic_concepts.md
Andrey Zaytsev 5e4cd1127b Integrate UAT fixes (#5517)
* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

* Edits to MO

Per findings spreadsheet

* macOS changes

per issue spreadsheet

* Fixes from review spreadsheet

Mostly IE_DG fixes

* Consistency changes

* Make doc fixes from last round of review

* integrate changes from baychub/master

* Update Intro.md

* Update Cutting_Model.md

* Update Cutting_Model.md

* Fixed link to Customize_Model_Optimizer.md

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
Co-authored-by: baychub <cbay@yahoo.com>
2021-05-06 15:37:13 +03:00

2.4 KiB

nGraph Basic Concepts

The nGraph represents neural networks in uniform format. User can create different operations and combined their to one ngraph::Function.

nGraph Function and Graph Representation

nGraph function is a very simple thing: it stores shared pointers to ngraph::op::Parameter, ngraph::op::Result and ngraph::op::Sink operations that are inputs, outputs and sinks of the graph. Sinks of the graph have no consumers and are not included in the results vector. All other operations hold each other via shared pointers: child operation holds its parent (hard link). If operation has no consumers and it's not Result or Sink operation (shared pointer counter is zero) then it will be destructed and won't be accessible anymore. Each operation in ngraph::Function has a std::shared_ptr<ngraph::Node> type.

For details on how to build an nGraph Function, see the Build nGraph Function page.

Operations

ngraph::Op represents any abstract operations in the nGraph representation. You need to use this class to create custom operations.

Operation Sets

Operation set represents the set of some nGraph operations. nGraph::Opset is a class which provide a functionality to work with operation sets. Custom operation set should be created to support custom operation. Please read Extensibility DevGuide for more details.

Static and Partial Shapes

nGraph has two types for shape representation:

  • ngraph::Shape - Represents static (fully defined) shapes.

  • ngraph::PartialShape - Represents dynamic shapes. That means that the rank or some of dimensions are dynamic (undefined). ngraph::PartialShape can be converted to ngraph::Shape using the get_shape() method if all dimensions are static; otherwise the conversion raises an exception.

For examples, see the Dynamic Shape and Rank section in the Overview of Transformations API.

Transformation API

nGraph transformation API allows you to manipulate the graph represented by nGraph::Function. For more details, see the Overview of Transformations API section.

Pattern Matcher

For more details, see the Pattern Matching section in the Overview of Transformations API.