|
|
|
@ -92,7 +92,8 @@ public: |
|
|
|
|
{ |
|
|
|
|
return backendId == DNN_BACKEND_OPENCV || |
|
|
|
|
(backendId == DNN_BACKEND_HALIDE && haveHalide() && axisRaw == 1) || |
|
|
|
|
((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH) && haveInfEngine() && !logSoftMax); |
|
|
|
|
backendId == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH || |
|
|
|
|
(backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 && haveInfEngine() && !logSoftMax); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef HAVE_OPENCL |
|
|
|
@ -330,6 +331,9 @@ public: |
|
|
|
|
auto& ieInpNode = nodes[0].dynamicCast<InfEngineNgraphNode>()->node; |
|
|
|
|
int axis = clamp(axisRaw, ieInpNode->get_shape().size()); |
|
|
|
|
auto softmax = std::make_shared<ngraph::op::v1::Softmax>(ieInpNode, axis); |
|
|
|
|
if (logSoftMax) |
|
|
|
|
return Ptr<BackendNode>(new InfEngineNgraphNode(std::make_shared<ngraph::op::v0::Log>(softmax))); |
|
|
|
|
|
|
|
|
|
return Ptr<BackendNode>(new InfEngineNgraphNode(softmax)); |
|
|
|
|
} |
|
|
|
|
#endif // HAVE_DNN_NGRAPH
|
|
|
|
|