aiaccel.torch.datasets.CachedDataset#

class aiaccel.torch.datasets.CachedDataset(dataset: Dataset[T_co])[source]#

A dataset wrapper that caches the samples to improve performance.

Parameters:

dataset (Dataset) – The original dataset to be wrapped.

dataset#

The original dataset.

Type:

Dataset

manager#

The multiprocessing manager.

Type:

Manager

cache#

The cache dictionary to store the cached samples.

Type:

dict

__init__(dataset: Dataset[T_co]) None[source]#

Methods

__init__(dataset)