bob.med.tb.models.normalizer

A network model that prefixes a z-normalization step to any other module

Classes

TorchVisionNormalizer([nb_channels])

A simple normalizer that applies the standard torchvision normalization

class bob.med.tb.models.normalizer.TorchVisionNormalizer(nb_channels=3)[source]

Bases: torch.nn.modules.module.Module

A simple normalizer that applies the standard torchvision normalization

This module does not learn.

Parameters

nb_channels (int, Optional) – Number of images channels fed to the model

set_mean_std(mean, std)[source]
forward(inputs)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool