Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akuporos committed Aug 28, 2023
1 parent 6b1ea6a commit 66e3cf9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/snippets/ie_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def callback(output_blobs, _):
infer_request.set_completion_callback(callback, py_data=infer_request.output_blobs)

# Async pipline is managed by ExecutableNetwork
total_frames = 1
total_frames = 100
for _ in range(total_frames):
# Wait for at least one free request
exec_network.wait(num_requests=1)
Expand Down
9 changes: 5 additions & 4 deletions docs/snippets/ov_infer_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ def callback(request, _):
#! [get_set_index_tensor]

data = get_image()
input_tensor_name = "input"

#! [get_set_tensor]
tensor1 = infer_request.get_tensor("res")
tensor1 = infer_request.get_tensor("result")
tensor2 = ov.Tensor(data)
infer_request.set_tensor("data", tensor2)
infer_request.set_tensor(input_tensor_name, tensor2)
#! [get_set_tensor]

#! [get_set_tensor_by_port]
input_port = model.input(0)
output_port = model.input("data")
output_port = model.input(input_tensor_name)
input_tensor = ov.Tensor(data)
infer_request.set_tensor(input_port, input_tensor)
output_tensor = infer_request.get_tensor(output_port)
Expand All @@ -89,7 +90,7 @@ def callback(request, _):
# roi_tensor uses shared memory of input_tensor and describes cropROI
# according to its coordinates **/
roi_tensor = ov.Tensor(input_tensor, begin, end)
infer_request2.set_tensor("data", roi_tensor)
infer_request2.set_tensor(input_tensor_name, roi_tensor)
#! [roi_tensor]

#! [remote_tensor]
Expand Down
4 changes: 2 additions & 2 deletions docs/snippets/ov_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
# ! [ov:preprocess:build]

# ! [ov:preprocess:input_index]
#ppp.input(1) # Gets 2nd input in a model
#ppp.output(2) # Gets output with index=2 (3rd one) in a model
ppp.input(1) # Gets 2nd input in a model
ppp.output(2) # Gets output with index=2 (3rd one) in a model
# ! [ov:preprocess:input_index]


Expand Down

0 comments on commit 66e3cf9

Please sign in to comment.