diff options
author | Louis Verhaard <louis.verhaard@arm.com> | 2020-12-18 14:23:06 +0100 |
---|---|---|
committer | Louis Verhaard <louis.verhaard@arm.com> | 2020-12-22 16:04:38 +0100 |
commit | f4e12beff027e8463aeaed7b75d5e48afb25c8b3 (patch) | |
tree | 6e56a37b7ca30c9f8acdafc08a4627bdadb374d2 /ethosu/vela/test/test_tflite_reader.py | |
parent | f27a8b65f8cff8fc52db8e39a6eb8f78b6616c6b (diff) | |
download | ethos-u-vela-f4e12beff027e8463aeaed7b75d5e48afb25c8b3.tar.gz |
MLBEDSW-3561: Support const STRING input tensors
Added handling of input tensors with constant string data.
Signed-off-by: Louis Verhaard <louis.verhaard@arm.com>
Change-Id: Ieb5164a9d56d580ad08ea834bf2cbb7288cd9539
Diffstat (limited to 'ethosu/vela/test/test_tflite_reader.py')
-rw-r--r-- | ethosu/vela/test/test_tflite_reader.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ethosu/vela/test/test_tflite_reader.py b/ethosu/vela/test/test_tflite_reader.py index 14c9b204..a69e8d37 100644 --- a/ethosu/vela/test/test_tflite_reader.py +++ b/ethosu/vela/test/test_tflite_reader.py @@ -84,9 +84,9 @@ class TestTFLiteSubgraph: string_buffer_testdata = [ (np.array([np.random.randint(256) for _ in range(100)], dtype=np.uint8), [3, 5]), - (np.array([np.random.randint(256) for _ in range(100)], dtype=np.int16), [10, 10]), - (np.array([np.random.randint(256) for _ in range(100)], dtype=np.float32), [100]), - (np.array([], dtype=np.int8), [30]), + (np.array([np.random.randint(256) for _ in range(100)], dtype=np.uint8), [10, 10]), + (np.array([np.random.randint(256) for _ in range(100)], dtype=np.uint8), []), + (np.array([], dtype=np.uint8), [30]), ] @pytest.mark.parametrize("buffer, tens_shape", string_buffer_testdata) @@ -111,4 +111,4 @@ class TestTFLiteSubgraph: subgraph = TFLiteSubgraph(graph, tfl_sg) tens = subgraph.parse_tensor(tens_data) - assert tens.values is None + assert np.array_equal(tens.values, buffer) |