diff options
Diffstat (limited to 'inference-engine/src/mkldnn_plugin/nodes/mkldnn_softmax_node.cpp')
-rw-r--r-- | inference-engine/src/mkldnn_plugin/nodes/mkldnn_softmax_node.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_softmax_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_softmax_node.cpp index 0a8caf5ae..0738f0054 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_softmax_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_softmax_node.cpp @@ -30,9 +30,9 @@ void MKLDNNSoftMaxNode::getSupportedDescriptors() { THROW_IE_EXCEPTION << "Cannot convert softmax layer."; if (getParentEdges().size() != 1) - THROW_IE_EXCEPTION << "Incorrect number of input edges."; + THROW_IE_EXCEPTION << "Incorrect number of input edges for layer " << getName(); if (!getChildEdges().size()) - THROW_IE_EXCEPTION << "Incorrect number of output edges."; + THROW_IE_EXCEPTION << "Incorrect number of output edges for layer " << getName(); axis = smLayer->axis; @@ -40,6 +40,11 @@ void MKLDNNSoftMaxNode::getSupportedDescriptors() { THROW_IE_EXCEPTION << "Incorrect axis!"; } + if (getParentEdgeAt(0)->getDims().ndims() == 3) { + MKLDNNMemoryDesc in_candidate(getParentEdgeAt(0)->getDims(), inputDataType, memory::format::blocked); + createDescriptor({in_candidate}, {}); + } + for (auto format : getAvailableFormatsForDims(getParentEdgeAt(0)->getDims())) { MKLDNNDims dims = getParentEdgeAt(0)->getDims(); if (MKLDNNMemoryDesc(dims, inputDataType, format).blocksExtended()) |