3 つの出力を持つカスタムモデルのテンソルを出力できません
コンテンツタイプ: エラーメッセージ | 記事 ID: 000090966 | 最終改訂日: 2023/11/13
OpenVINO.runtime からコアをインポートする
core = Core()
model = core.read_model(model="model.xml")
compiled_model = core.compile_model(モデル、"CPU")
infer_request = compiled_model.create_infer_request()
infer_request.start_async()
infer_request.wait()
output = infer_request.get_output_tensor()
印刷(出力)
ランタイムエラー: get_output_tensor() は、パラメーターが 1 つだけある関数で呼び出す必要があります。
引数なしの ov::InferRequest::get_output_tensor メソッドは、出力が 1 つだけのモデルに使用できます。
output1 = infer_request.get_output_tensor(0)
output2 = infer_request.get_output_tensor(1)
output3 = infer_request.get_output_tensor(2)
output_buffer1 = output2.data
output_buffer2 = output2.data
output_buffer3 = output3.data
print(output_buffer1)
print(output_buffer2)
print(output_buffer3)