Skip to content

Commit

Permalink
fix(py runtime_test): remove test for zero-initialized output tensor (#…
Browse files Browse the repository at this point in the history
…2946)

Remove the test that incorrectly asserts the output tensor is
initially all zeros. The tensor is allocated from a shared memory
arena, and its initial state is not guaranteed to be zero. This
test eventually failed due to variations in memory allocation
during build and runtime; see the failed checks in #2945.

BUG=#2636
  • Loading branch information
rkuester authored Dec 2, 2024
1 parent c28b493 commit 17f5844
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions python/tflite_micro/runtime_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,6 @@ def testOutput(self):
model_data = generate_test_models.generate_conv_model(True, self.filename)
tflm_interpreter = runtime.Interpreter.from_bytes(model_data)

# Initial output values are all 0
output = tflm_interpreter.get_output(0)
init_output = np.zeros(self.output_shape)
self.assertAllEqual(output, init_output)

# Test the output tensor details
output_details = tflm_interpreter.get_output_details(0)
self.assertAllEqual(output_details["shape"], self.output_shape)
Expand Down

0 comments on commit 17f5844

Please sign in to comment.