GPLaSDI
GPLaSDI copied to clipboard
Modularizing encoder/decoder in Autoencoder class
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 twoMultiLayerPerceptron
s as encoder and decoder.