aidsorb.transforms#
Helper functions and classes for transforming input representations.
Warning
Transforms avoid in-place modifications. However, the output tensor(s) might be view(s) of the input tensor. If it is necessary to preserve the original data, it is recommended to copy them before applying the transform.
Note
All transforms are implemented using torch. Any randomness is handled
through PyTorchβs RNG, so reproducibility can be controlled with
torch.manual_seed().
Tip
For implementing your own transforms, have a look at the transforms
tutorial. For more flexibility, consider implementing them as callable
instances of classes. If your transforms use some source of randomness, it
is recommended to control it with torch.
Submodules