luigibonati / mlcolvar

A unified framework for machine learning collective variables for enhanced sampling simulations
MIT License
89 stars 24 forks source link

First implementation of a Variation Autoencoder CV #27

Closed andrrizzi closed 1 year ago

andrrizzi commented 1 year ago

Description

This implements a CV based on a standard variational autoencoder using a MSE reconstruction loss and regularizing with a KL divergence w.r.t. a Normal(0, 1) distribution. For the CV, only the mean is used as CV in production.

Questions

Status

luigibonati commented 1 year ago

Questions

  • [ ] I forgot, did we decide to have a mechanism to do the preprocessing inside training_step()? For now, I'm not doing any preprocessing during training.

No, the way you implemented is correct and uniform with the other classes (e.g. overloading forward_blocks) in the sense that base cv class has a forward method that adds pre and post processing modules to forward_blocks. As it is now, this is not supposed to take place during training