autoencoders

Collection of Fully Connected Autoencoders.

Classes

Autoencoder Primitive Model for all fully connected autoencoders.
class ashpy.models.fc.autoencoders.Autoencoder(hidden_units, encoding_dimension, output_shape)[source]

Bases: tensorflow.python.keras.engine.training.Model

Primitive Model for all fully connected autoencoders.

Examples

  • Direct Usage:
    autoencoder = Autoencoder(
        hidden_units=[256,128,64],
        encoding_dimension=100,
        output_shape=55
    )
    
    encoding, reconstruction = autoencoder(tf.zeros((1, 55)))
    print(encoding.shape)
    print(reconstruction.shape)
    
    
    
__init__(hidden_units, encoding_dimension, output_shape)[source]

Instantiate the Decoder.

Parameters:
  • hidden_units (tuple of int) – Number of units per hidden layer.
  • encoding_dimension (int) – encoding dimension.
  • output_shape (int) – output shape, usual equal to the input shape.
Returns:

None

call(inputs, training=True)[source]

Execute the model on input data.

Parameters:
  • inputs (tf.Tensor) – Input tensors.
  • training (bool) – Training flag.
Returns:

(encoding, reconstruction) – Pair of tensors.