Skip to content

Commit

Permalink
Merge pull request #87 from sony/fix/20190510_dali-data-iterator
Browse files Browse the repository at this point in the history
Align the latest changes of DALI pkg
  • Loading branch information
TakuyaNarihira authored May 16, 2019
2 parents 595ec9d + dcae9cd commit f4f902e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions imagenet-classification/dali_data_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f4f902e

Please sign in to comment.