Learn R Programming

daltoolboxdp (version 1.2.737)

autoenc_adv_e: Adversarial Autoencoder - Encode

Description

Creates a deep learning adversarial autoencoder (AAE) to encode sequences of observations. Wraps a PyTorch implementation.

Usage

autoenc_adv_e(
  input_size,
  encoding_size,
  batch_size = 350,
  num_epochs = 1000,
  learning_rate = 0.001
)

Value

A autoenc_adv_e object.

Arguments

input_size

input size

encoding_size

encoding size

batch_size

size for batch learning

num_epochs

number of epochs for training

learning_rate

learning rate

Details

Adversarial autoencoders regularize the latent space using an adversarial training objective, encouraging the aggregated posterior to match a prior distribution. This can lead to more structured latent representations.

References

Makhzani, A., Shlens, J., Jaitly, N., Goodfellow, I., & Frey, B. (2016). Adversarial Autoencoders.

Examples

Run this code
if (FALSE) {
X <- matrix(rnorm(1000), nrow = 50, ncol = 20)
ae <- autoenc_adv_e(input_size = 20, encoding_size = 5, num_epochs = 50)
ae <- daltoolbox::fit(ae, X)       # adversarially-regularized encoder
Z  <- daltoolbox::transform(ae, X) # encodings
dim(Z)
}

# See a complete example:
# https://github.com/cefet-rj-dal/daltoolbox/blob/main/autoencoder/autoenc_adv_e.md

Run the code above in your browser using DataLab