/**
* @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
- * @brief Returns a smart pointer reference to a Data node given its name.
- *
- * If the Data node is missing, returns reference to a default initialized new empty data pointer with given name.
- *
- * @param dname Name of the Data node
- * @return Data node smart pointer
- */
- INFERENCE_ENGINE_DEPRECATED("Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1")
- virtual DataPtr& getData(const char* dname) noexcept = 0;
-
- /**
- * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
* @brief Insert a layer into the network. A user is responsible to connect it to other data elements.
*
* @param layer Const reference to a layer smart pointer
_inputData[data->name()] = data;
}
-DataPtr& CNNNetworkNGraphImpl::getData(const char* name) noexcept {
- if (cnnNetwork) return cnnNetwork->getData(name);
- if (_data.find(name) != _data.end()) {
- return _data[name];
- } else {
- try {
- convertToCNNNetworkImpl();
- return cnnNetwork->getData(name);
- } catch (...) {
- return _data[name];
- }
- }
-}
-
-DataPtr& CNNNetworkNGraphImpl::getData(const std::string& name) {
- IE_SUPPRESS_DEPRECATED_START
- return getData(name.c_str());
- IE_SUPPRESS_DEPRECATED_END
-}
-
const std::string& CNNNetworkNGraphImpl::getName() const noexcept {
if (cnnNetwork) {
return cnnNetwork->getName();
void setInputInfo(InputInfo::Ptr data);
- INFERENCE_ENGINE_DEPRECATED("Use ngraph::Function directly")
- DataPtr& getData(const char* name) noexcept override;
-
- INFERENCE_ENGINE_DEPRECATED("Use ngraph::Function directly")
- DataPtr& getData(const std::string& name);
-
std::shared_ptr<ICNNNetwork> getCNNNetwork();
// This method is not really implemented; don't call it
return _layers.size();
}
- DataPtr& getData(const char* name) noexcept override {
+ DataPtr& getData(const char* name) noexcept {
return _data[name];
}
ASSERT_STREQ(idMemInput.c_str(), "r-1-2-3");
}
-TEST_F(GraphCopyTests, canPreserveGetData) {
- auto clone = CNNNetCopy<MockCopier>(*mockNet, mc);
-
- ASSERT_NE(clone->getData("1"), nullptr);
- ASSERT_NE(clone->getData("2"), nullptr);
- ASSERT_NE(clone->getData("3"), nullptr);
- ASSERT_NE(clone->getData("4"), nullptr);
- ASSERT_NE(clone->getData("5"), nullptr);
-}
-
#ifdef ENABLE_GNA
using namespace GNAPluginNS;
struct _FP32_2_FP32 : public GNAPluginNS::frontend::QuantDescTmpl<float, float, float, float, float> {