ソースを参照

fix the iteration method (#4576)

zhang-prog 1 ヶ月 前
コミット
4127933ab4
1 ファイル変更1 行追加1 行削除
  1. 1 1
      paddlex/inference/pipelines/_parallel.py

+ 1 - 1
paddlex/inference/pipelines/_parallel.py

@@ -44,7 +44,7 @@ class MultiDeviceSimpleInferenceExecutor(object):
                 input_future_pairs = []
                 for pipeline in self._pipelines:
                     try:
-                        input_batch = list(input_batches)[0]
+                        input_batch = next(input_batches)
                     except StopIteration:
                         out_of_data = True
                         break