Skip to content

Decoder

latent.modules.decoder.Decoder

Decoder base model. This model decompresses a latent space to reconstruct the input data by passing it through a DenseStack. It also takes care of adding the reconstruction loss to the model.

__init__(self, x_dim, name='decoder', hidden_units=[128, 128], reconstruction_loss=None, loss_name='rec_loss', initializer='glorot_normal', **kwargs) special

Parameters:

Name Type Description Default
x_dim int

Integer indicating the number of dimensions in the input data.

required
name str

String indicating the name of the model.

'decoder'
hidden_units Iterable[int]

Number of hidden units in DenseStack. If set to None the model skips the DenseStack and reduces to a linear decoder (Svensson 2020).

[128, 128]
reconstruction_loss Union[Callable, str]

Function to compute reconstruction loss.

None
loss_name str

String indicating the name of the loss.

'rec_loss'
initializer Union[str, Callable]

Initializer for the kernel weights matrix (see keras.initializers)

'glorot_normal'
**kwargs

Other arguments passed on to DenseStack

{}