From 723ff2dbfd861de3f203f64ddc3abfa9faafe027 Mon Sep 17 00:00:00 2001 From: Viet Dang Date: Thu, 28 Mar 2019 17:22:56 +0000 Subject: [PATCH] BidirectionalSequenceLSTM op: Fixes VTS test for merge_outputs Bug: 123644584 Test: VtsHalNeuralnetworksV1_xTargetTest Change-Id: I8829fd47094ca4af05e5d60da917499ce61acc5e Merged-In: I8829fd47094ca4af05e5d60da917499ce61acc5e (cherry picked from commit a8f33f7dbff1c3ad0cb01b7f9214b8bf49eaa992) --- .../1.2/vts/functional/ValidateModel.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp index dc452e93a2..acf3cb6547 100644 --- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp +++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp @@ -508,14 +508,15 @@ static bool removeOperandSkip(size_t operand, const Model& model) { } } } - // BIDIRECTIONAL_SEQUENCE_RNN can have either on or two outputs - // depending on a mergeOutputs parameter - if (operation.type == OperationType::BIDIRECTIONAL_SEQUENCE_RNN) { - for (const size_t outOprand : operation.outputs) { - if (operand == outOprand) { - return true; - } + // BIDIRECTIONAL_SEQUENCE_LSTM and BIDIRECTIONAL_SEQUENCE_RNN can have + // either one or two outputs depending on their mergeOutputs parameter. + if (operation.type == OperationType::BIDIRECTIONAL_SEQUENCE_LSTM || + operation.type == OperationType::BIDIRECTIONAL_SEQUENCE_RNN) { + for (const size_t outOprand : operation.outputs) { + if (operand == outOprand) { + return true; } + } } } return false;