We're using the Subset class from Pytorch. We need a Dataset class to work with, so we get the underlying self.dataset. But that is the whole dataset, so we're doing nothing when we subset. This operation is critical because is used in:
Train / Validation split
Making sets smaller to log some metrics, because that metrics computation is really slow
We're using the
Subset
class from Pytorch. We need aDataset
class to work with, so we get the underlyingself.dataset
. But that is the whole dataset, so we're doing nothing when we subset. This operation is critical because is used in: