GPLaSDI icon indicating copy to clipboard operation
GPLaSDI copied to clipboard

Modularizing encoder/decoder in Autoencoder class

Open dreamer2368 opened this issue 4 months ago • 0 comments

This PR must be merged after PR #9 .

Using DistributedDataParallel for data parallelism requires access to encoder and decoder as a torch.nn.Module. Current Autoencoder class provide encoder and decoder as member functions, though DistributedDataParallel cannot use custom member functions except forward.

  • lasdi.latent_space.MultiLayerPerceptron is now provided as a distinct module for a vanilla MLP.
  • lasdi.latent_space.Autoencoder simply contains two MultiLayerPerceptrons as encoder and decoder.

dreamer2368 avatar Oct 10 '24 23:10 dreamer2368