Skip to content

Commit

Permalink
Merge pull request opencv#17616 from ilya-lavrenov:network-reader
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Jun 22, 2020
2 parents 6e5f0a2 + 63e92cc commit ee5ff71
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions modules/dnn/test/test_ie_models.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,6 @@ void runIE(Target target, const std::string& xmlPath, const std::string& binPath
{
SCOPED_TRACE("runIE");

CNNNetReader reader;
reader.ReadNetwork(xmlPath);
reader.ReadWeights(binPath);

CNNNetwork net = reader.getNetwork();

std::string device_name;

#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GT(2019010000)
Expand All @@ -150,6 +144,17 @@ void runIE(Target target, const std::string& xmlPath, const std::string& binPath
InferenceEnginePluginPtr enginePtr;
InferencePlugin plugin;
#endif

#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GT(2019030000)
CNNNetwork net = ie.ReadNetwork(xmlPath, binPath);
#else
CNNNetReader reader;
reader.ReadNetwork(xmlPath);
reader.ReadWeights(binPath);

CNNNetwork net = reader.getNetwork();
#endif

ExecutableNetwork netExec;
InferRequest infRequest;

Expand Down

0 comments on commit ee5ff71

Please sign in to comment.