summaryrefslogtreecommitdiff
path: root/nn/runtime/test/TestValidateOperations.cpp
diff options
context:
space:
mode:
authorSlava Shklyaev <slavash@google.com>2020-05-05 14:29:40 +0100
committerSlava Shklyaev <slavash@google.com>2020-05-06 11:10:29 +0100
commit768c300f8fa32d9936eeb6f2fc338beeb5f209ea (patch)
tree030df4bf3f5d376c53f0a096b1f0649a071c5ad9 /nn/runtime/test/TestValidateOperations.cpp
parent9d3b5e64365692945ad58912d7fa738111d31c66 (diff)
downloadml-768c300f8fa32d9936eeb6f2fc338beeb5f209ea.tar.gz
Improve shape validation in FULLY_CONNECTED
1. Adds bias dimension count validation. 2. Does more validation in validate(). Bug: 155575142 Bug: 155261461 Test: NNT_static --gtest_filter="*while_fib*" Test: NNT_static --gtest_filter=ValidationTestDimensionProductOverflow2.DynamicOutputShapeOverflow Change-Id: I7b70a29e76fdf99e656ee6e3867cfd97675cfeec
Diffstat (limited to 'nn/runtime/test/TestValidateOperations.cpp')
-rw-r--r--nn/runtime/test/TestValidateOperations.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/nn/runtime/test/TestValidateOperations.cpp b/nn/runtime/test/TestValidateOperations.cpp
index 7748acd45..4ac4f8d7d 100644
--- a/nn/runtime/test/TestValidateOperations.cpp
+++ b/nn/runtime/test/TestValidateOperations.cpp
@@ -2374,7 +2374,9 @@ void fullyConnectedOpTest(int32_t operandCode) {
OperationTestBase fullyConnectedTest(ANEURALNETWORKS_FULLY_CONNECTED,
{input, weights, bias, activation}, {output},
- {{TensorRankConstraint::Between(2, 4)}});
+ {{TensorRankConstraint::Between(2, 4), {0}},
+ {TensorRankConstraint::Exactly(2), {1}},
+ {TensorRankConstraint::Exactly(1), {2}}});
fullyConnectedTest.testOpsValidations();
}