Follow up for PR #3784 (#3821)

This commit is contained in:
Ilya Lavrenov 2021-01-13 12:24:23 +03:00 committed by GitHub
parent b452991a9a
commit b203e9e9ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,8 +110,8 @@ public:
addInputPreProcessingFor(name, userBlob, devBlob ? devBlob : _inputs[name]);
} else {
size_t inputSize = foundInput->getTensorDesc().getLayout() != InferenceEngine::Layout::SCALAR
? InferenceEngine::details::product(foundInput->getTensorDesc().getDims())
: 1;
? InferenceEngine::details::product(foundInput->getTensorDesc().getDims())
: 1;
if (dataSize != inputSize) {
THROW_IE_EXCEPTION << "Input blob size is not equal network input size (" << dataSize
<< "!=" << inputSize << ").";
@ -124,7 +124,9 @@ public:
THROW_IE_EXCEPTION << NOT_IMPLEMENTED_str
<< "cannot set compound blob: supported only for input pre-processing";
}
size_t outputSize = details::product(foundOutput->getDims());
size_t outputSize = foundOutput->getTensorDesc().getLayout() != InferenceEngine::Layout::SCALAR
? details::product(foundOutput->getTensorDesc().getDims()) :
1;
if (dataSize != outputSize) {
THROW_IE_EXCEPTION << "Output blob size is not equal network output size (" << dataSize
<< "!=" << outputSize << ").";