mmagic.models.archs.img_normalize
¶
Module Contents¶
Classes¶
Normalize images with the given mean and std value. |
- class mmagic.models.archs.img_normalize.ImgNormalize(pixel_range: float, img_mean: Tuple[float, float, float], img_std: Tuple[float, float, float], sign: int = - 1)[source]¶
Bases:
torch.nn.Conv2d
Normalize images with the given mean and std value.
Based on Conv2d layer, can work in GPU.
- Parameters
pixel_range (float) – Pixel range of feature.
img_mean (Tuple[float]) – Image mean of each channel.
img_std (Tuple[float]) – Image std of each channel.
sign (int) – Sign of bias. Default -1.