Use ngraph.hpp in samples and documentation (#1240)
This commit is contained in:
parent
2e3378c50f
commit
5feeab37d4
@ -5,15 +5,10 @@
|
||||
#include <memory>
|
||||
|
||||
// ! [ngraph:include]
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
// ! [ngraph:include]
|
||||
|
||||
#include <ngraph/function.hpp>
|
||||
#include <ngraph/pattern/op/label.hpp>
|
||||
#include <ngraph/rt_info.hpp>
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/pass/visualize_tree.hpp>
|
||||
|
||||
using namespace ngraph;
|
||||
|
||||
// ! [ngraph_utils:simple_function]
|
||||
@ -248,4 +243,4 @@ void visualization_example(std::shared_ptr<ngraph::Function> f) {
|
||||
// Serialize ngraph::Function to after.svg file after transformation
|
||||
ngraph::pass::VisualizeTree("/path/to/file/after.svg").run_on_module(g);
|
||||
}
|
||||
// ! [ngraph:visualize]
|
||||
// ! [ngraph:visualize]
|
||||
|
@ -4,8 +4,7 @@
|
||||
#include "extension.hpp"
|
||||
#include "cpu_kernel.hpp"
|
||||
#include "op.hpp"
|
||||
#include <ngraph/factory.hpp>
|
||||
#include <ngraph/opsets/opset.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -17,8 +17,7 @@
|
||||
#include <threading/ie_executor_manager.hpp>
|
||||
#include <details/ie_cnn_network_tools.h>
|
||||
|
||||
#include <ngraph/specialize_function.hpp>
|
||||
#include <ngraph/pass/manager.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
#include <transformations/common_optimizations/common_optimizations.hpp>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <cnn_network_impl.hpp>
|
||||
#include <threading/ie_itask_executor.hpp>
|
||||
|
||||
#include <ngraph/function.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
#include "template_config.hpp"
|
||||
#include "template_infer_request.hpp"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "template_function_transformation.hpp"
|
||||
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
using namespace ngraph;
|
||||
|
||||
@ -36,4 +36,4 @@ bool MyFunctionTransformation::run_on_function(std::shared_ptr<ngraph::Function>
|
||||
// Return false because we didn't change nGraph Function
|
||||
return false;
|
||||
}
|
||||
// ! [function_pass:template_transformation_cpp]
|
||||
// ! [function_pass:template_transformation_cpp]
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <ngraph/pass/pass.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
// ! [function_pass:template_transformation_hpp]
|
||||
// template_function_transformation.hpp
|
||||
@ -17,4 +17,4 @@ public:
|
||||
|
||||
bool run_on_function(std::shared_ptr<ngraph::Function> f) override;
|
||||
};
|
||||
// ! [function_pass:template_transformation_hpp]
|
||||
// ! [function_pass:template_transformation_hpp]
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "template_pattern_transformation.hpp"
|
||||
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
#include <ngraph/rt_info.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
using namespace ngraph;
|
||||
|
||||
@ -48,4 +48,4 @@ void ngraph::pass::MyPatternBasedTransformation::transform() {
|
||||
// Register Matcher
|
||||
this->add_matcher(m, callback, ngraph::pass::PassProperty::CHANGE_DYNAMIC_STATE);
|
||||
}
|
||||
// ! [graph_rewrite:template_transformation_cpp]
|
||||
// ! [graph_rewrite:template_transformation_cpp]
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
#include <ngraph/pass/graph_rewrite.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
namespace ngraph {
|
||||
namespace pass {
|
||||
@ -28,4 +28,4 @@ public:
|
||||
private:
|
||||
void transform();
|
||||
};
|
||||
// ! [graph_rewrite:template_transformation_hpp]
|
||||
// ! [graph_rewrite:template_transformation_hpp]
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
|
||||
#include <ngraph/function.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
#include <transformations/init_node_info.hpp>
|
||||
#include <transformations/utils/utils.hpp>
|
||||
|
@ -7,8 +7,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <ie_core.hpp>
|
||||
#include <ngraph/function.hpp>
|
||||
#include <ngraph/op/detection_output.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
#include <samples/ocv_common.hpp>
|
||||
|
||||
|
@ -12,9 +12,7 @@
|
||||
#include <ie_iextension.h>
|
||||
#include <ie_blob.h>
|
||||
|
||||
#include <ngraph/op/op.hpp>
|
||||
#include <ngraph/node.hpp>
|
||||
#include <ngraph/opsets/opset.hpp>
|
||||
#include <ngraph/ngraph.hpp>
|
||||
|
||||
#define CUSTOM_RELU_TYPE "CustomReLU"
|
||||
|
||||
|
@ -84,6 +84,7 @@ namespace ngraph
|
||||
#include "ngraph/descriptor/output.hpp"
|
||||
#include "ngraph/descriptor/tensor.hpp"
|
||||
#include "ngraph/dimension.hpp"
|
||||
#include "ngraph/evaluator.hpp"
|
||||
#include "ngraph/except.hpp"
|
||||
#include "ngraph/factory.hpp"
|
||||
#include "ngraph/function.hpp"
|
||||
@ -91,8 +92,20 @@ namespace ngraph
|
||||
#include "ngraph/node.hpp"
|
||||
#include "ngraph/ops.hpp"
|
||||
#include "ngraph/partial_shape.hpp"
|
||||
#include "ngraph/rt_info.hpp"
|
||||
#include "ngraph/shape.hpp"
|
||||
#include "ngraph/shape_util.hpp"
|
||||
#include "ngraph/specialize_function.hpp"
|
||||
#include "ngraph/type.hpp"
|
||||
#include "ngraph/type/element_type.hpp"
|
||||
#include "ngraph/validation_util.hpp"
|
||||
#include "ngraph/variant.hpp"
|
||||
|
||||
// nGraph opsets
|
||||
#include "ngraph/opsets/opset.hpp"
|
||||
|
||||
// nGraph passes
|
||||
#include "ngraph/pass/get_output_element_elimination.hpp"
|
||||
#include "ngraph/pass/graph_rewrite.hpp"
|
||||
#include "ngraph/pass/manager.hpp"
|
||||
#include "ngraph/pass/visualize_tree.hpp"
|
||||
|
Loading…
Reference in New Issue
Block a user