Skip to content

Commit

Permalink
binding data to the first input tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-tan committed Nov 29, 2019
1 parent 1b4f614 commit 5baed55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/tflm/tflite_export/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ def test_tflite_fb_write(hybrid_quant_output):
open("tflm_test_model.tflite", "wb").write(model_content)
test_model = tf.lite.Interpreter('tflm_test_model.tflite')
test_model.allocate_tensors()
input_data = np.array(np.ones([4,1]), dtype=np.float32)
test_model.set_tensor(test_model.get_input_details()[0]['index'], input_data)
test_model.invoke()

print("0 :", test_model.get_tensor(0))
Expand Down

0 comments on commit 5baed55

Please sign in to comment.