commit
e2117f2fb8
|
@ -84,12 +84,12 @@ class Batch_Balanced_Dataset(object):
|
|||
|
||||
for i, data_loader_iter in enumerate(self.dataloader_iter_list):
|
||||
try:
|
||||
image, text = data_loader_iter.next()
|
||||
image, text = next(data_loader_iter)
|
||||
balanced_batch_images.append(image)
|
||||
balanced_batch_texts += text
|
||||
except StopIteration:
|
||||
self.dataloader_iter_list[i] = iter(self.data_loader_list[i])
|
||||
image, text = self.dataloader_iter_list[i].next()
|
||||
image, text = next(self.dataloader_iter_list[i])
|
||||
balanced_batch_images.append(image)
|
||||
balanced_batch_texts += text
|
||||
except ValueError:
|
||||
|
|
Loading…
Reference in New Issue