steganogan.critics module

class steganogan.critics.BasicCritic(hidden_size)[source]

Bases: torch.nn.modules.module.Module

The BasicCritic module takes an image and predicts whether it is a cover image or a steganographic image (N, 1).

Input: (N, 3, H, W) Output: (N, 1)

forward(x)[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.

upgrade_legacy()[source]

Transform legacy pretrained models to make them usable with new code versions.