23 #include "ngraph/op/constant.hpp"
24 #include "ngraph/partial_shape.hpp"
25 #include "ngraph/type/element_type.hpp"
26 #include "onnx_import/utils/onnx_importer_visibility.hpp"
28 namespace ONNX_NAMESPACE
72 void set_input_shapes(
const std::map<std::string, ngraph::PartialShape>& input_shapes);
86 const std::map<std::string, std::shared_ptr<ngraph::op::Constant>>& input_values);
92 ONNX_NAMESPACE::ModelProto&
model()
const;
104 const std::string m_model_path;
107 std::unique_ptr<Impl, void (*)(Impl*)> m_pimpl;
A class representing a set of utilities allowing modification of an ONNX model.
Definition: editor.hpp:46
void set_input_types(const std::map< std::string, element::Type_t > &input_types)
Modifies the in-memory representation of the model (m_model_proto) by setting custom input types for ...
const std::string & model_path() const
Returns the path to the original model file.
ONNX_NAMESPACE::ModelProto & model() const
Returns a non-const reference to the underlying ModelProto object, possibly modified by the editor's ...
void set_input_values(const std::map< std::string, std::shared_ptr< ngraph::op::Constant >> &input_values)
Modifies the in-memory representation of the model by setting custom input values for inputs specifie...
void set_input_shapes(const std::map< std::string, ngraph::PartialShape > &input_shapes)
Modifies the in-memory representation of the model (m_model_proto) by setting custom input shapes for...
ONNXModelEditor(const std::string &model_path)
Creates an editor from a model file located on a storage device. The file is parsed and loaded into t...
void serialize(const std::string &out_file_path) const
Saves the possibly model held by this class to a file. Serializes in binary mode.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28