ImageWrapper#
- class torchaug.transforms.ImageWrapper(transforms, inplace=False)[source]#
Wrap transforms to handle image data.
Note
Iterates through transforms and their submodules.
If
inplaceattribute is found, it is set toTrue,inplaceis handled at the wrapper level.
Note
If a transform makes a copy, the resulting tensor will not share the same underlying storage even if
inplaceis set toTrue.- Parameters:
transforms (
Union[Sequence[Module],Module]) – A list of transform modules.inplace (
bool, optional) – Whether to perform the transforms inplace.Default:False- forward(img)[source]#
Apply
transformson the image.Call
Wrapper.forward().- Parameters:
image – The image to transform.
- Return type:
Tensor- Returns:
The transformed image.