How dose the PyTorch design the Dataset and Subset for easily using?
Dataset
Subset
-
Each subset is also a Dataset. So it must inherit the
Dataset
base class. -
They are not ‘actually’ set the data of a Subset to the child collection of the whole Dataset. They use a
indices
parameter to store the position of the data in the whole Dataset. -
__getitem()__