* First draft of nGraph documentation * updated according to review comments * Updated * Reviewed the nGraph Transformation section, added missing images * Update nGraph_dg.md * Delete python_api.md Removed since there is already the nGraph_Python_API.md document with a comprehensive overview. Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com> Co-authored-by: CCR\avladimi <anastasiya.ageeva@intel.com>
1.5 KiB
Build nGraph Function
This section illustrates how to construct an nGraph function
composed of operations from an available opset. Once created,
it can wrap into a CNNNetwork, creating utility for data scientists
or app developers to define a deep-learning model in a neutral way
that does not depend on existing Deep Learning (DL) frameworks.
Operation Set opsetX integrates a list of nGraph pre-compiled operations that work
for this purpose. In other words, opsetX defines a set of operations for building a graph.
For a complete list of operation sets supported by Inference Engine, see Available Operations Sets.
To add custom nGraph operations to an existing CNNNetwork, see
the Add Custom nGraph Operations document.
Below you can find examples on to how build ngraph::Function from the opset3 operations:
@snippet example_ngraph_utils.cpp ngraph:include
@snippet example_ngraph_utils.cpp ngraph_utils:simple_function
@snippet example_ngraph_utils.cpp ngraph_utils:advanced_function
To wrap it into a CNNNetwork, use:
CNNNetwork net (ng_function);