steganogan.decoders module

class steganogan.decoders.BasicDecoder(data_depth, hidden_size)[source]

Bases: torch.nn.modules.module.Module

The BasicDecoder module takes an steganographic image and attempts to decode the embedded data tensor.

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

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.

class steganogan.decoders.DenseDecoder(data_depth, hidden_size)[source]

Bases: steganogan.decoders.BasicDecoder

The DenseDecoder module takes an steganographic image and attempts to decode the embedded data tensor.

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

upgrade_legacy()[source]

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