File size: 903 Bytes
9c6594c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
from typing import Any, Iterator, List, Optional, TypeVar
from .pytorch import IterableDataset
T = TypeVar('T')
Dataset = IterableDataset
Source = Iterator[T]
def round_robin_shortest(*sources: Source) -> Iterator[T]: ...
def round_robin_longest(*sources: Source) -> Iterator[T]: ...
class RoundRobin(IterableDataset):
datasets: List[Dataset]
longest: bool
def __init__(self, datasets: List[Dataset], longest: bool = False) -> None: ...
def __iter__(self) -> Iterator[Any]: ...
def random_samples(sources: List[Source], probs: Optional[List[float]] = None, longest: bool = False) -> Iterator[T]: ...
class RandomMix(IterableDataset):
datasets: List[Dataset]
probs: Optional[List[float]]
longest: bool
def __init__(self, datasets: List[Dataset], probs: Optional[List[float]] = None, longest: bool = False) -> None: ...
def __iter__(self) -> Iterator[Any]: ...
|