syna.datasets.datasets module¶
Datasets — minimal dataset base class (MNIST behavior compatible with torchvision).
- class syna.datasets.datasets.Dataset(train: bool = True, transform: Callable[[Any], Any] | None = None, target_transform: Callable[[Any], Any] | None = None)[source]¶
Bases:
object
Minimal base dataset.
Subclasses should override prepare() to populate self.data (and optionally self.label).
- Args:
train (bool): Whether this is a training split. transform (callable, optional): Function applied to each data item. target_transform (callable, optional): Function applied to each label.
- Attributes:
data: Sequence of data items (must support indexing and len()). label: Sequence of labels or None.