Skip to content

Commit 8cc8b0d

Browse files
committed
Merge pull request opencv#17633 from alalek:backport_17616
2 parents 7fae2e8 + ad5e70f commit 8cc8b0d

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

modules/dnn/test/test_ie_models.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,6 @@ void runIE(Target target, const std::string& xmlPath, const std::string& binPath
136136
{
137137
SCOPED_TRACE("runIE");
138138

139-
CNNNetReader reader;
140-
reader.ReadNetwork(xmlPath);
141-
reader.ReadWeights(binPath);
142-
143-
CNNNetwork net = reader.getNetwork();
144-
145139
std::string device_name;
146140

147141
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GT(2019010000)
@@ -150,6 +144,17 @@ void runIE(Target target, const std::string& xmlPath, const std::string& binPath
150144
InferenceEnginePluginPtr enginePtr;
151145
InferencePlugin plugin;
152146
#endif
147+
148+
#if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_GT(2019030000)
149+
CNNNetwork net = ie.ReadNetwork(xmlPath, binPath);
150+
#else
151+
CNNNetReader reader;
152+
reader.ReadNetwork(xmlPath);
153+
reader.ReadWeights(binPath);
154+
155+
CNNNetwork net = reader.getNetwork();
156+
#endif
157+
153158
ExecutableNetwork netExec;
154159
InferRequest infRequest;
155160

0 commit comments

Comments
 (0)