Shortcuts

mmagic.models.archs.img_normalize

Module Contents

Classes

ImgNormalize

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.

Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.