torchfont.transforms.transformsΒΆ
Composable transforms for polishing tensor glyph sequences before training.
Notes
Each transform is intentionally small and deterministic, allowing you to mix
and match them in torch.utils.data.Dataset pipelines without losing
track of where normalization occurs.
Examples
Normalize and patch glyph tensors in a single pipeline:
pipeline = Compose([LimitSequenceLength(256), Patchify(32)])
Classes
|
Apply a curated list of transform callables to every sample. |
|
Trim glyph sequences to a predictable maximum length. |
|
Pad glyph sequences and reshape them into uniform, model-friendly patches. |