diff --git a/docs/OV_Runtime_UG/migration_ov_2_0/graph_construction.md b/docs/OV_Runtime_UG/migration_ov_2_0/graph_construction.md index 872d312ed15..c26fc3611dc 100644 --- a/docs/OV_Runtime_UG/migration_ov_2_0/graph_construction.md +++ b/docs/OV_Runtime_UG/migration_ov_2_0/graph_construction.md @@ -1,38 +1,56 @@ # Model Creation in OpenVINO™ Runtime {#openvino_2_0_model_creation} -OpenVINO™ Runtime with API 2.0 includes the nGraph engine as a common part. The `ngraph` namespace has been changed to `ov`, but all other parts of the ngraph API have been preserved. +@sphinxdirective + +OpenVINO™ Runtime with API 2.0 includes the nGraph engine as a common part. The ``ngraph`` namespace has been changed to ``ov``, but all other parts of the ngraph API have been preserved. The code snippets below show how to change the application code for migration to API 2.0. -## nGraph API +nGraph API +#################### -@sphinxtabset +.. tab-set:: -@sphinxtab{C++} -@snippet docs/snippets/ngraph.cpp ngraph:graph -@endsphinxtab + .. tab-item:: C++ + :sync: cpp -@sphinxtab{Python} -@snippet docs/snippets/ngraph.py ngraph:graph -@endsphinxtab + .. doxygensnippet:: docs/snippets/ngraph.cpp + :language: cpp + :fragment: ngraph:graph -@endsphinxtabset + .. tab-item:: Python + :sync: py -## API 2.0 + .. doxygensnippet:: docs/snippets/ngraph.py + :language: Python + :fragment: ngraph:graph -@sphinxtabset -@sphinxtab{C++} -@snippet docs/snippets/ov_graph.cpp ov:graph -@endsphinxtab +API 2.0 +#################### -@sphinxtab{Python} -@snippet docs/snippets/ov_graph.py ov:graph -@endsphinxtab -@endsphinxtabset +.. tab-set:: -## Additional Resources + .. tab-item:: C++ + :sync: cpp -- [Hello Model Creation C++ Sample](../../../samples/cpp/model_creation_sample/README.md) -- [Hello Model Creation Python Sample](../../../samples/python/model_creation_sample/README.md) + .. doxygensnippet:: docs/snippets/ov_graph.cpp + :language: cpp + :fragment: ov:graph + + .. tab-item:: Python + :sync: py + + .. doxygensnippet:: docs/snippets/ov_graph.py + :language: Python + :fragment: ov:graph + + +Additional Resources +#################### + +* :doc:`Hello Model Creation C++ Sample ` +* :doc:`Hello Model Creation Python Sample ` + +@endsphinxdirective