Add LSTM and SFM to Pymc

It depends on how you want to go about to use it, I see there are 2 possible ways, both are a bit challenging:

  • Set up LSTM or SFM neural net as an approximation for autoencoding variational Bayes, similar idea: https://docs.pymc.io/notebooks/lda-advi-aevb.html. The challenge is to make sure the parameter clone is performed correctly, and you need a good logp function for the observed with the LSTM or SFM parameters are input.
  • Use LSTM or SFM layer in a PyMC3 model. The challenge here is that Keras recurrent layer might not work out of the box, and inference could be extremely difficult.
2 Likes