Пример #1
0
 def __init__(self, targets_list: Sequence[Sequence[TTargetType]],
              converter: Optional[Callable[[Any], TTargetType]] = None):
     self._targets_list = targets_list
     self._targets_lengths = [len(targets) for targets in targets_list]
     self._overall_length = sum(self._targets_lengths)
     self._targets_cumulative_lengths = ConcatDataset.cumsum(targets_list)
     self.converter = converter