From dcae9cd6f77a8fbf507b5a07eefed995a514ad9f Mon Sep 17 00:00:00 2001 From: "TE-Kazuki.Yoshiyama" Date: Fri, 10 May 2019 10:54:50 +0200 Subject: [PATCH] Align the latest changes of DALI pkg. --- imagenet-classification/dali_data_iterator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imagenet-classification/dali_data_iterator.py b/imagenet-classification/dali_data_iterator.py index 22bb1f395..595215e67 100644 --- a/imagenet-classification/dali_data_iterator.py +++ b/imagenet-classification/dali_data_iterator.py @@ -106,6 +106,8 @@ def __init__(self, # We need data about the batches (like shape information), # so we need to run a single batch as part of setup to get that info + for p in self._pipes: + p._run() self._first_batch = None self._first_batch = self.next() @@ -120,8 +122,6 @@ def __next__(self): # raise StopIteration # Gather outputs outputs = [] - for p in self._pipes: - p._prefetch() for p in self._pipes: outputs.append(p._share_outputs()) for i in range(self._num_gpus): @@ -172,7 +172,7 @@ def __next__(self): for p in self._pipes: p._release_outputs() - p._start_run() + p._run() copy_db_index = self._current_data_batch # Change index for double buffering