diff options
author | Isabella Gottardi <isabella.gottardi@arm.com> | 2019-01-11 16:35:36 +0000 |
---|---|---|
committer | Isabella Gottardi <isabella.gottardi@arm.com> | 2019-01-14 09:26:32 +0000 |
commit | 685c181d5ac36948f8df22f627ef9b3a74b5f87e (patch) | |
tree | 02e725a55fcc48f66a74cb18c79517cfbf5a8a1f /tests/validation | |
parent | cc5171b85654b9f19a5f52bbe8abea0572ee0163 (diff) | |
download | ComputeLibrary-685c181d5ac36948f8df22f627ef9b3a74b5f87e.tar.gz |
COMPMID-1710: Fix TopKV Tests
Change-Id: I36833a08b07b1e5e658198a449ea91a909210252
Reviewed-on: https://review.mlplatform.org/499
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation')
-rw-r--r-- | tests/validation/CPP/TopKV.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/validation/CPP/TopKV.cpp b/tests/validation/CPP/TopKV.cpp index ee11cbc54c..02178192aa 100644 --- a/tests/validation/CPP/TopKV.cpp +++ b/tests/validation/CPP/TopKV.cpp @@ -129,8 +129,8 @@ TEST_CASE(Float, framework::DatasetMode::ALL) topkv.run(); // Validate against the expected values - SimpleTensor<float> expected_output(TensorShape(20), DataType::U8); - fill_tensor(expected_output, std::vector<uint8_t> { 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1 }); + SimpleTensor<uint8_t> expected_output(TensorShape(20), DataType::U8); + fill_tensor(expected_output, std::vector<uint8_t> { 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0 }); validate(Accessor(output), expected_output); } @@ -138,7 +138,7 @@ TEST_CASE(Quantized, framework::DatasetMode::ALL) { const unsigned int k = 5; - Tensor predictions = create_tensor<Tensor>(TensorShape(10, 20), DataType::F32); + Tensor predictions = create_tensor<Tensor>(TensorShape(10, 20), DataType::QASYMM8, 1, QuantizationInfo()); Tensor targets = create_tensor<Tensor>(TensorShape(20), DataType::U32); predictions.allocator()->allocate(); @@ -182,8 +182,8 @@ TEST_CASE(Quantized, framework::DatasetMode::ALL) topkv.run(); // Validate against the expected values - SimpleTensor<float> expected_output(TensorShape(20), DataType::U8); - fill_tensor(expected_output, std::vector<uint8_t> { 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0 }); + SimpleTensor<uint8_t> expected_output(TensorShape(20), DataType::U8); + fill_tensor(expected_output, std::vector<uint8_t> { 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0 }); validate(Accessor(output), expected_output); } |