ml4gw.nn.autoencoder.base
Classes
|
Base autoencoder class that defines some of the basic methods and functionality. |
- class ml4gw.nn.autoencoder.base.Autoencoder(skip_connection=None)
Bases:
ModuleBase autoencoder class that defines some of the basic methods and functionality. Autoencoders are defined here as a set of sequential blocks that have an
encodemethod, which acts on the input data to the autoencoder, and adecodemethod, which acts on the encoded vector generated by theencodemethod.forwardjust runs these steps one after the other. Although it isn't explicitly enforced, a good rule of thumb is that the ouput of a block'sdecodemethod should have the same shape as the _input_ of itsencodemethod.Accepts a
skip_connectionargument that defines how to combine information from the input of one block'sencodelayer with the output to itsdecodelayer. Seeskip_connections.pyfor more info about what these classes are expected to contain and how they operate.- Parameters:
skip_connection (SkipConnection | None)
- decode(*X, states=None)
- Return type:
Tensor- Parameters:
states (Sequence[Tensor] | None)
- encode(*X, return_states=False)
- Return type:
Tensor|tuple[Tensor,Sequence]- Parameters:
X (Tensor)
return_states (bool)
- forward(*X)
- Return type:
Tensor- Parameters:
X (Tensor)