Add reset_state method to Python API (#21660)

* Add reset_state method to Python API

* fix missprint

* codestyle

* extend python tests

* delete debug code

* resolve review comments
This commit is contained in:
Ivan Tikhonov authored and GitHub committed 2023-12-18 11:26:53 +04:00
1 parent 0e7248430c
commit c4a49a3987
4 files changed
+22 -9

No files matched your search

+2 -4
View File
@@ -44,8 +44,7 @@ def main():
output_tensors.append(infer_request.get_tensor(output))
# 7. Initialize memory state before starting
for state in infer_request.query_state():
state.reset()
infer_request.reset_state()
#! [ov:part1]
# input data
@@ -66,8 +65,7 @@ def main():
log.info(state_buf[0])
log.info("\nReset state between utterances...\n")
for state in infer_request.query_state():
state.reset()
infer_request.reset_state()
log.info("Infer the second utterance")
for next_input in range(int(len(input_data)/2), len(input_data)):