FF's Notes
← Home

PyTorch Dataset

Dec 1, 2020

How dose the PyTorch design the Dataset and Subset for easily using?

Dataset

Subset

  1. Each subset is also a Dataset. So it must inherit the Dataset base class.
  2. 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.
  3. __getitem()__

    2021-10-14_11-41-31_screenshot.png