deepdraw.models.normalizer#
A network model that prefixes a z-normalization step to any other module.
Classes
A simple normalizer that applies the standard torchvision normalization. |
- class deepdraw.models.normalizer.TorchVisionNormalizer[source]#
Bases:
Module
A simple normalizer that applies the standard torchvision normalization.
This module does not learn.
The values applied in this “prefix” operator are defined at https://pytorch.org/docs/stable/torchvision/models.html, and are as follows:
mean
:[0.485, 0.456, 0.406]
,std
:[0.229, 0.224, 0.225]
- 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.