brails.processors.foundation_classifier.csail_segmentation_tool.csail_seg.lib.utils.data.dataset module
- class brails.processors.foundation_classifier.csail_segmentation_tool.csail_seg.lib.utils.data.dataset.ConcatDataset(datasets)
Bases:
Dataset
Dataset to concatenate multiple datasets. Purpose: useful to assemble different existing datasets, possibly large-scale datasets as the concatenation operation is done in an on-the-fly manner.
- Arguments:
datasets (iterable): List of datasets to be concatenated
- property cummulative_sizes
- static cumsum(sequence)
- class brails.processors.foundation_classifier.csail_segmentation_tool.csail_seg.lib.utils.data.dataset.Dataset
Bases:
object
An abstract class representing a Dataset.
All other datasets should subclass it. All subclasses should override
__len__
, that provides the size of the dataset, and__getitem__
, supporting integer indexing in range from 0 to len(self) exclusive.
- class brails.processors.foundation_classifier.csail_segmentation_tool.csail_seg.lib.utils.data.dataset.Subset(dataset, indices)
Bases:
Dataset
- class brails.processors.foundation_classifier.csail_segmentation_tool.csail_seg.lib.utils.data.dataset.TensorDataset(data_tensor, target_tensor)
Bases:
Dataset
Dataset wrapping data and target tensors.
Each sample will be retrieved by indexing both tensors along the first dimension.
- Arguments:
data_tensor (Tensor): contains sample data. target_tensor (Tensor): contains sample targets (labels).
- brails.processors.foundation_classifier.csail_segmentation_tool.csail_seg.lib.utils.data.dataset.random_split(dataset, lengths)
Randomly split a dataset into non-overlapping new datasets of given lengths ds
- Arguments:
dataset (Dataset): Dataset to be split lengths (iterable): lengths of splits to be produced