41 INFERENCE_ENGINE_DEPRECATED
43 if (actual ==
nullptr) {
66 ,
actual(reader->getNetwork(nullptr)) {
92 return std::move(outputs);
102 return std::move(inputs);
151 INFERENCE_ENGINE_DEPRECATED
154 IE_SUPPRESS_DEPRECATED_START
156 IE_SUPPRESS_DEPRECATED_END
163 void addOutput(
const std::string &layerName,
size_t outputIndex = 0) {
164 CALL_STATUS_FNC(
addOutput, layerName, outputIndex);
182 details::CNNNetworkIterator
begin()
const {
183 return details::CNNNetworkIterator(
actual);
189 details::CNNNetworkIterator
end()
const {
190 return details::CNNNetworkIterator();
198 return std::distance(std::begin(*
this), std::end(*
this));
205 void AddExtension(InferenceEngine::IShapeInferExtensionPtr extension) {
217 for (
const auto& pair : inputs) {
218 auto info = pair.second;
220 auto data = info->getInputData();
222 shapes[data->getName()] = data->getTensorDesc().getDims();
226 return std::move(shapes);
234 CALL_STATUS_FNC(
reshape, inputShapes);
243 void serialize(
const std::string &xmlPath,
const std::string &binPath =
"")
const {
244 CALL_STATUS_FNC(
serialize, xmlPath, binPath);
CNNLayerPtr getLayerByName(const char *layerName) const
Wraps original method ICNNNetwork::getLayerByName.
Definition: ie_cnn_network.h:171
virtual void getName(char *pName, size_t len) const noexcept=0
Gets the network name. The name is stored in the given pName string.
#define THROW_IE_EXCEPTION
A macro used to throw the exception with a notable description.
Definition: ie_exception.hpp:22
virtual ~CNNNetwork()
A destructor.
Definition: ie_cnn_network.h:75
CNNNetwork(std::shared_ptr< ICNNNetwork > network)
Allows helper class to manage lifetime of network object.
Definition: ie_cnn_network.h:52
TargetDevice
Describes known device types.
Definition: ie_device.hpp:24
ICNNNetwork * actual
A pointer to the current network.
Definition: ie_cnn_network.h:260
Definition: ie_argmax_layer.hpp:11
std::shared_ptr< CNNLayer > CNNLayerPtr
A smart pointer to the CNNLayer.
Definition: ie_common.h:36
A header file that provides macros to handle no exception methods.
virtual ICNNNetwork::InputShapes getInputShapes() const
Helper method to get collect all input shapes with names of corresponding Data objects ...
Definition: ie_cnn_network.h:213
const std::string & getName() const noexcept
Wraps original method ICNNNetwork::getName.
Definition: ie_cnn_network.h:117
virtual void getInputsInfo(InputsDataMap &inputs) const noexcept=0
Gets the network input Data node information. The received info is stored in the given InputsDataMap ...
virtual InputsDataMap getInputsInfo() const
Wraps original method ICNNNetwork::getInputsInfo.
Definition: ie_cnn_network.h:99
void addOutput(const std::string &layerName, size_t outputIndex=0)
Wraps original method ICNNNetwork::addOutput.
Definition: ie_cnn_network.h:163
A header file for Blob and generic TBlob<>
A header file for the CNNNetworkIterator class.
details::CNNNetworkIterator begin() const
Begin layer iterator Order of layers is implementation specific, and can be changed in future...
Definition: ie_cnn_network.h:182
void setTargetDevice(TargetDevice device)
Sets tha target device.
Definition: ie_cnn_network.h:153
This is a header file for the ICNNNetwork class.
virtual void reshape(const ICNNNetwork::InputShapes &inputShapes)
Run shape inference with new input shapes for the network.
Definition: ie_cnn_network.h:233
size_t layerCount() const
Wraps original method ICNNNetwork::layerCount.
Definition: ie_cnn_network.h:109
virtual size_t getBatchSize() const noexcept=0
Gets the inference batch size.
virtual Precision getPrecision() const
Wraps original method ICNNNetwork::getPrecision.
Definition: ie_cnn_network.h:81
virtual size_t getBatchSize() const
Wraps original method ICNNNetwork::getBatchSize.
Definition: ie_cnn_network.h:133
std::shared_ptr< ICNNNetReader > reader
reader extra reference, might be nullptr
Definition: ie_cnn_network.h:251
This is the main interface to describe the NN topology.
Definition: ie_icnn_network.hpp:35
details::CNNNetworkIterator end() const
End layer iterator.
Definition: ie_cnn_network.h:189
void serialize(const std::string &xmlPath, const std::string &binPath="") const
Serialize network to IR and weights files.
Definition: ie_cnn_network.h:243
CNNNetwork(std::shared_ptr< ICNNNetReader > reader)
A constructor from ICNNNetReader object.
Definition: ie_cnn_network.h:64
virtual OutputsDataMap getOutputsInfo() const
Wraps original method ICNNNetwork::getOutputsInfo.
Definition: ie_cnn_network.h:89
This class contains all the information about the Neural Network and the related binary information...
Definition: ie_cnn_network.h:29
This header file defines the main Data representation node.
std::shared_ptr< ICNNNetwork > network
network extra interface, might be nullptr
Definition: ie_cnn_network.h:255
virtual void setTargetDevice(TargetDevice device) noexcept=0
Sets a desirable device to perform all work on. Some plug-ins might not support some target devices a...
CNNNetwork(ICNNNetwork *actual)
Initialises helper class from externally managed pointer.
Definition: ie_cnn_network.h:42
virtual size_t layerCount() const noexcept=0
Returns the number of layers in the network as an integer value.
virtual void setBatchSize(const size_t size)
Wraps original method ICNNNetwork::setBatchSize.
Definition: ie_cnn_network.h:125
size_t size() const
number of layers in network object
Definition: ie_cnn_network.h:197
DataPtr output
A pointer to output data.
Definition: ie_cnn_network.h:264
A header file that provides interface for network reader that is used to build networks from a given ...
std::shared_ptr< Data > DataPtr
Smart pointer to Data.
Definition: ie_common.h:50
void AddExtension(InferenceEngine::IShapeInferExtensionPtr extension)
Registers extension within the plugin.
Definition: ie_cnn_network.h:205
std::map< std::string, DataPtr > OutputsDataMap
A collection that contains string as key, and Data smart pointer as value.
Definition: ie_icnn_network.hpp:30
std::map< std::string, SizeVector > InputShapes
Map of pairs: name of corresponding data and its dimension.
Definition: ie_icnn_network.hpp:177
virtual Precision getPrecision() const noexcept=0
Returns the main network operating precision. This may be MIXED if not homogeneous.
virtual void getOutputsInfo(OutputsDataMap &out) const noexcept=0
Gets the network output Data node information. The received info is stored in the given Data node...
CNNNetwork()=default
A default constructor.
This is a header file with common inference engine definitions.
This class holds precision value and provides precision related operations.
Definition: ie_precision.hpp:19