neuro_morpho.model.transforms
Image transformations for data augmentation and preprocessing.
Classes
Standardize an image. |
|
Normalize an image to the range [0, 1]. |
|
Downsample an image by a given factor. |
Module Contents
- class neuro_morpho.model.transforms.Standardize(eps: float = 1e-08)
Bases:
torch.nn.ModuleStandardize an image.
This transform subtracts the mean and divides by the standard deviation.
- eps = 1e-08
- forward(x: torch.Tensor) torch.Tensor
Apply the standardization.
- class neuro_morpho.model.transforms.Norm2One(eps: float = 1e-08)
Bases:
torch.nn.ModuleNormalize an image to the range [0, 1].
- eps = 1e-08
- forward(x: torch.Tensor) torch.Tensor
Apply the normalization.