Autoencoder GAN

Implementation of an Adversarial Autoencoder based on BeatGAN.

Implementation of a architecture using an autoencoder as generator and a discriminator.

Based on "BeatGAN: Anomalous Rhythm Detection using Adversarially Generated Time Series" by Zhou et al. 2019. We extend their work by a validation loop that includes the discriminator error and additional flexibility, especially allowing spectral weight normalization and similar configurable improvements such as the AdaBelief optimizer.

class ecgan.modules.generative.aegan.AEGAN(cfg, seq_len, num_channels)[source]

Bases: ecgan.modules.generative.base.encoder_gan_module.BaseEncoderGANModule

GAN-Autoencoder model.

Based on the reference implementation of BeatGAN.

property criterion_gen: ecgan.utils.losses.AEGANGeneratorLoss

Return the criterion for the generator.

Return type

AEGANGeneratorLoss

property criterion_disc: ecgan.utils.losses.AEGANDiscriminatorLoss

Return the criterion for the discriminator.

Return type

AEGANDiscriminatorLoss

get_sample(num_samples=None, data=None)[source]

Retrieve the reconstructed sampled x_hat from our model.

Return type

Tuple[Tensor, Tensor]

static configure()[source]

Return the default configuration for the BeatGAN model.

Return type

Dict