fix iterator

This commit is contained in:
shahules786 2022-10-26 12:00:57 +05:30
parent f07c8741ba
commit ee40259a8d
1 changed files with 5 additions and 4 deletions

View File

@ -302,10 +302,11 @@ class EnhancerDataset(TaskDataset):
if idx >= num_samples:
idx -= num_samples
continue
start = 0
if self.duration is not None:
start = idx * self.stride
return self.prepare_segment(filedict, start)
else:
start = 0
if self.duration is not None:
start = idx * self.stride
return self.prepare_segment(filedict, start)
def val__getitem__(self, idx):
return self.prepare_segment(*self._validation[idx])