[IE][VPU]: Enables check of parameters count for LSTMCell (#2335)

This commit is contained in:
Evgeny Latkin 2020-09-22 12:06:25 +03:00 committed by GitHub
parent 15ebc443d0
commit 171bf0fcc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -19,7 +19,7 @@ set(VPU_SUPPORTED_FIRMWARES usb-ma2450 usb-ma2x8x pcie-ma248x)
# Default packages # Default packages
# #
set(FIRMWARE_PACKAGE_VERSION 1388) set(FIRMWARE_PACKAGE_VERSION 1390)
set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.1") set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.1")
# #

View File

@ -83,6 +83,20 @@ private:
bool useTempBuffer = (nCells > 1); bool useTempBuffer = (nCells > 1);
IE_ASSERT((numTempBuffers() == 1 && useTempBuffer) || !useTempBuffer); IE_ASSERT((numTempBuffers() == 1 && useTempBuffer) || !useTempBuffer);
VPU_THROW_UNLESS(inputEdges().size() == 5,
"LSTMCell: input edges: {}, but expected: 5",
inputEdges().size());
// check number of outputs, without temp buffer
const int outputsNumber = outputEdges().size();
const int useCellState = outputsNumber >= 2;
const int outputEdgesExpected = 1
+ (useCellState ? 1 : 0)
+ (outputsNumber == 3 ? 1 : 0);
VPU_THROW_UNLESS(outputEdges().size() == outputEdgesExpected,
"LSTMCell: number of output edges: {}, but expected: {}",
outputEdges().size(), outputEdgesExpected);
for (const auto& inEdge : inputEdges()) { for (const auto& inEdge : inputEdges()) {
inEdge->input()->serializeBuffer(serializer); inEdge->input()->serializeBuffer(serializer);
} }