Skip to content

Commit 5baed55

Browse files
committed
binding data to the first input tensor
1 parent 1b4f614 commit 5baed55

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/tflm/tflite_export/test_write.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ def test_tflite_fb_write(hybrid_quant_output):
9494
open("tflm_test_model.tflite", "wb").write(model_content)
9595
test_model = tf.lite.Interpreter('tflm_test_model.tflite')
9696
test_model.allocate_tensors()
97+
input_data = np.array(np.ones([4,1]), dtype=np.float32)
98+
test_model.set_tensor(test_model.get_input_details()[0]['index'], input_data)
9799
test_model.invoke()
98100

99101
print("0 :", test_model.get_tensor(0))

0 commit comments

Comments
 (0)