Dataset and Sample Transforms (Torchvision-Style) #
This module provides a small transform library inspired by torchvision.transforms:
- composable pure transforms (
Compose,Lambda) - dataset mapping helpers
- common tensor/sample normalization utilities
PyTorch Mapping #
torchvision.transforms:https://pytorch.org/vision/stable/transforms.htmltorch.utils.data.Datasetmap-style datasets:https://pytorch.org/docs/stable/data.html
TorchLean difference: transforms are pure functions over typed tensors/samples, so shape mistakes are caught by the typechecker rather than at runtime.
Torchvision-style transform composition.
Applies transforms left-to-right:
Compose [f, g, h] x = h (g (f x)).
Instances For
Torchvision-style "Lambda" transform wrapper.
Instances For
Compose two pure transforms.
Instances For
Apply a pure transform to every element of a dataset.
Instances For
Map a tensor elementwise.
Instances For
Normalize any tensor elementwise: (x - mean) / std.
Instances For
Float-literal normalization helper for runtime scalar backends.
Instances For
Transform the input component of a supervised TorchLean sample TList α [σ, τ].
Instances For
Transform the target component of a supervised TorchLean sample TList α [σ, τ].
Instances For
Apply an input transform over a supervised TorchLean dataset.