API symbolsutilsCopyCopy as MarkdownCopy page linkView MarkdownDownload .mdOpenAIOpen in ChatGPTClaudeOpen in ClaudePerplexityOpen in PerplexityGrokOpen in Grok SubsetRandomSampler class tensorplay.utils.data.SubsetRandomSampler(indices: Sequence[int], generator: Generator | None = None)[source] Samples elements randomly from a given list of indices, without replacement. Parameters: indices (sequence) – a sequence of indices generator (Generator) – Generator used in sampling. Help improve this pageFound an error, an unclear step, or a missing example?Was this page helpful?YesNoSuggest an editReport an issueSubsetSubset of a dataset at specified indices.TensorDatasetDataset wrapping tensors.