steganogan.encoders module¶
-
class
steganogan.encoders.BasicEncoder(data_depth, hidden_size)[source]¶ Bases:
torch.nn.modules.module.ModuleThe BasicEncoder module takes an cover image and a data tensor and combines them into a steganographic image.
Input: (N, 3, H, W), (N, D, H, W) Output: (N, 3, H, W)
-
add_image= False¶
-
forward(image, data)[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
steganogan.encoders.DenseEncoder(data_depth, hidden_size)[source]¶ Bases:
steganogan.encoders.BasicEncoderThe DenseEncoder module takes an cover image and a data tensor and combines them into a steganographic image.
Input: (N, 3, H, W), (N, D, H, W) Output: (N, 3, H, W)
-
add_image= True¶
-
-
class
steganogan.encoders.ResidualEncoder(data_depth, hidden_size)[source]¶ Bases:
steganogan.encoders.BasicEncoderThe ResidualEncoder module takes an cover image and a data tensor and combines them into a steganographic image.
Input: (N, 3, H, W), (N, D, H, W) Output: (N, 3, H, W)
-
add_image= True¶
-