# Subset Source: https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.Subset.html ```python class tensorplay.utils.data.Subset(dataset: Dataset[_T_co], indices: Sequence[int]) ``` Subset of a dataset at specified indices. > **Note** > > When subclassing Subset and overriding __getitem__, you must also override __getitems__ to ensure DataLoader works correctly with your custom logic. If you override only __getitem__, a NotImplementedError will be raised when using DataLoader. Parameters: - dataset ([Dataset](/docs/generated/tensorplay.utils.data.Dataset.html#tensorplay.utils.data.Dataset)) – The whole Dataset - indices (sequence) – Indices in the whole set selected for subset