-
-
Notifications
You must be signed in to change notification settings - Fork 55.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support nGraph API #15537
Support nGraph API #15537
Conversation
CMakeLists.txt
Outdated
@@ -1595,19 +1595,22 @@ endif() | |||
|
|||
if(WITH_INF_ENGINE OR INF_ENGINE_TARGET) | |||
if(INF_ENGINE_TARGET) | |||
list(GET INF_ENGINE_TARGET 0 ie_target) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is these changes here? They should be on the 3.4 branch already: #15376
Please rebase patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@l-bat, These changes looks very promising to make IE backend more stable. I think we can now completely merge DNN_BACKEND_INFERENCE_ENGINE
and DNN_BACKEND_NGRAPH
implementations.
4de90de
to
ca459d5
Compare
|
||
#ifdef HAVE_DNN_NGRAPH | ||
return initNgraph(nodes); | ||
#endif // HAVE_DNN_NGRAPH | ||
InferenceEngine::Builder::Layer ieLayer = InferenceEngine::Builder::ScaleShiftLayer(name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How this can work without runtime check?
Please run tests locally.
InferenceEngine::CNNNetReader reader; | ||
reader.ReadNetwork(xml); | ||
reader.ReadWeights(bin); | ||
|
||
InferenceEngine::CNNNetwork ieNet = reader.getNetwork(); | ||
#else | ||
InferenceEngine::Core& ie = getCore(); | ||
InferenceEngine::CNNNetwork ieNet = ie.ReadNetwork(xml, bin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkurt Please review this part of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, but CNNNetReader
is almost deprecated.
modules/dnn/src/ie_ngraph.cpp
Outdated
if (cnn.getPrecision() != InferenceEngine::Precision::FP16 && targetId == DNN_TARGET_MYRIAD) | ||
resetMyriadDevice(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it here?
if (!equal_flag) | ||
{ | ||
InferenceEngine::CNNNetwork curr_t_net(t_net); | ||
curr_t_net.reshape(inShapes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is ".get()" method with "const" logical modifier doing some network reshaping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a workaround introduced at #13608 to dynamically reshape networks from OpenVINO's IRs in case of different input shape.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Support new Inference Engine API.
Problem layers:
Failed nets:
⁉️ Test_Torch_nets.FastNeuralStyle_accuracy (DLDT)
✔️ DNNTestNetwork.MobileNet_SSD_Caffe_Different_Width_Height (bad norm)
✔️ DNNTestNetwork.OpenFace (bad norm) support Power
✔️ Test_Caffe_nets.FasterRCNN_zf (Proposal bug)
✔️ Test_TensorFlow_nets.opencv_face_detector_uint8 (blob not found) -> bad norm
✔️ Test_TensorFlow_nets.EAST_text_detection (maxpool incorrect shape + incorrect net) -> bad norm (support Power)
🔻 Test_Torch_nets.ENet_accuracy (bad norm)
✔️ Test_Torch_nets.OpenFace_accuracy (bad norm) support Power
❌ TEST_P(Test_Darknet_nets_async, Accuracy) (layer = nullptr sigseg Region doesn't supported)
After fuse:
✔️ Test_ONNX_nets.DenseNet121 (blob not found)
✔️ Test_Darknet_nets.YOLOv3 ( bad norm - DLDT)
✔️ Deconv3D fixed #15572
✔️ Eltwise with coeffs
✔️ Pooling (default ceil TF)
✔️ Scale (BatchNorm)
Link with IE nGraph:
🔻 Test_Caffe_nets.FasterRCNN_vgg16
✔️ Test_TensorFlow_nets.Faster_RCNN (topK DetectionOutput)