API symbolsutils
Copy
RandomSampler
- class tensorplay.utils.data.RandomSampler(data_source: Sized, replacement: bool = False, num_samples: int | None = None, generator: Generator | None = None)[source]
Samples elements randomly. If without replacement, then sample from a shuffled dataset. If with replacement, then user can specify
num_samplesto draw.- Parameters:
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?
