15 #include <ie_parameter.hpp>
34 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(PortInfo) {
40 PortInfo(
idx_t layerID): layer(layerID), port(0) {}
47 PortInfo(
idx_t layerID,
idx_t portID): layer(layerID), port(portID) {}
53 idx_t layerId()
const {
61 idx_t portId()
const {
65 IE_SUPPRESS_DEPRECATED_START
72 bool operator==(
const PortInfo& portInfo)
const {
73 return layer == portInfo.layerId() && port == portInfo.portId();
81 bool operator!=(
const PortInfo& portInfo)
const {
82 return !(*
this == portInfo);
85 IE_SUPPRESS_DEPRECATED_END
96 class INFERENCE_ENGINE_NN_BUILDER_DEPRECATED
Connection {
98 IE_SUPPRESS_DEPRECATED_START
105 Connection(
const PortInfo& input,
const PortInfo& output): input(input), output(output) {}
113 return input == connection.
from() && output == connection.
to();
122 return !(*
this == connection);
137 const PortInfo&
to()
const {
145 IE_SUPPRESS_DEPRECATED_END
152 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(PortData) {
154 IE_SUPPRESS_DEPRECATED_START
159 using Ptr = std::shared_ptr<PortData>;
161 IE_SUPPRESS_DEPRECATED_END
178 virtual ~PortData() =
default;
196 const std::map<std::string, Parameter>& getParameters()
const noexcept;
206 std::map<std::string, Parameter> parameters;
215 class INFERENCE_ENGINE_NN_BUILDER_API_CLASS(Port) {
232 virtual ~Port() =
default;
234 IE_SUPPRESS_DEPRECATED_START
240 Port(
const Port& port);
247 bool operator==(
const Port& rhs)
const;
254 bool operator!=(
const Port& rhs)
const;
256 IE_SUPPRESS_DEPRECATED_END
275 const std::map<std::string, Parameter>& getParameters()
const noexcept;
281 void setParameters(
const std::map<std::string, Parameter>& params) noexcept;
288 void setParameter(
const std::string& name,
const Parameter& param);
290 IE_SUPPRESS_DEPRECATED_START
296 const PortData::Ptr& getData()
const noexcept;
302 void setData(
const PortData::Ptr& data);
305 std::map<std::string, Parameter> parameters;
308 IE_SUPPRESS_DEPRECATED_END
320 class INFERENCE_ENGINE_NN_BUILDER_DEPRECATED
ILayer {
322 IE_SUPPRESS_DEPRECATED_START
327 using CPtr = std::shared_ptr<const ILayer>;
329 IE_SUPPRESS_DEPRECATED_END
334 virtual ~
ILayer() =
default;
340 virtual idx_t getId() const noexcept = 0;
346 virtual const std::
string& getName() const noexcept = 0;
352 virtual const std::
string& getType() const noexcept = 0;
358 virtual const std::map<std::
string,
Parameter>& getParameters() const noexcept = 0;
360 IE_SUPPRESS_DEPRECATED_START
366 virtual const std::vector<Port>& getInputPorts() const noexcept = 0;
372 virtual const std::vector<Port>& getOutputPorts() const noexcept = 0;
374 IE_SUPPRESS_DEPRECATED_END
379 template <
class NT,
class LT>
380 class INFERENCE_ENGINE_NN_BUILDER_DEPRECATED INetworkIterator;
390 class INFERENCE_ENGINE_NN_BUILDER_DEPRECATED
INetwork {
392 IE_SUPPRESS_DEPRECATED_START
397 using CPtr = std::shared_ptr<const INetwork>;
403 IE_SUPPRESS_DEPRECATED_END
426 virtual
size_t size() const noexcept = 0;
428 IE_SUPPRESS_DEPRECATED_START
442 virtual const std::vector<
ILayer::
CPtr> getInputs() const noexcept = 0;
448 virtual const std::vector<
ILayer::
CPtr> getOutputs() const noexcept = 0;
456 virtual const std::vector<
Connection> getLayerConnections(
idx_t layerId) const noexcept = 0;
462 virtual const Context& getContext() const noexcept = 0;
464 IE_SUPPRESS_DEPRECATED_END
470 virtual const std::
string& getName() const noexcept = 0;
475 #include <details/ie_inetwork_iterator.hpp>
bool operator==(const Connection &connection) const
Compares the given Connection with the current one.
Definition: ie_network.hpp:112
Inference Engine API.
Definition: ie_argmax_layer.hpp:11
const PortInfo & from() const
Definition: ie_network.hpp:129
std::shared_ptr< const ILayer > CPtr
A shared pointer to the const ILayer object.
Definition: ie_network.hpp:327
A header file for Blob and generic TBlob<>
Connection(const PortInfo &input, const PortInfo &output)
Constructor of a connection object.
Definition: ie_network.hpp:105
std::shared_ptr< const INetwork > CPtr
A shared pointer to the constant INetwork object.
Definition: ie_network.hpp:397
This class defines Tensor description.
Definition: ie_layouts.h:140
const PortInfo & to() const
Definition: ie_network.hpp:137
std::shared_ptr< Blob > Ptr
A smart pointer containing Blob object.
Definition: ie_blob.h:40
A header file for data layouts and conversion between them.
Definition: ie_network.hpp:313
size_t idx_t
A type of network objects indexes.
Definition: ie_network.hpp:28
This class is the main interface to describe the Inference Engine network.
Definition: ie_network.hpp:390
details::INetworkIterator< const INetwork, const ILayer > const_iterator
A constant iterator for INetwork definition.
Definition: ie_network.hpp:401
This class is the main interface to describe the Inference Engine layer. All methods here are constan...
Definition: ie_network.hpp:320
This class represents an object to work with different parameters.
Definition: ie_parameter.hpp:36
bool operator!=(const Connection &connection) const
Checks if the given Connection is not equal to the current one.
Definition: ie_network.hpp:121
std::vector< size_t > SizeVector
Represents tensor size. The order is opposite to the order in Caffe*: (w,h,n,b) where the most freque...
Definition: ie_common.h:27
This is a header file for the IE Context class.
This class is the main object to describe the Inference Engine connection.
Definition: ie_network.hpp:96
This class holds precision value and provides precision related operations.
Definition: ie_precision.hpp:21
Definition: ie_precision.hpp:25