aiaccel.torch.datasets.HDF5Dataset#
- class aiaccel.torch.datasets.HDF5Dataset(dataset_path: Path | str, grp_list: Path | str | list[str] | None = None)[source]#
A dataset class for loading data from an HDF5 file.
This class extends the RawHDF5Dataset class and provides a convenient way to load data from an HDF5 file and convert it into a dictionary of torch tensors.
- Parameters:
path (str) – The path to the HDF5 file.
transform (callable, optional) – A function/transform that takes in a dictionary of data and returns a modified version. Default is None.
- Returns:
- A dictionary containing the data loaded from the HDF5 file, where the keys are
the names of the data fields and the values are torch tensors.
- Return type:
dict[str, torch.Tensor]
- __init__(dataset_path: Path | str, grp_list: Path | str | list[str] | None = None) None #
Methods
__init__
(dataset_path[, grp_list])