This is the implementation of TDVAE in NLP with transformers. I am trying to predict the latent vector of next sentence based on all historic sentences. Though this is a failure attempt but some implementations here might be useful to someone who is interested in TDVAE or VAE in general. Note I am not aiming to provide a fully runnable end to end demo here. Take the part you are interested and enjoy :).
For a more detailed explanation of what I have done and why this is a failed attempt, check my blog post here: https://zhuanlan.zhihu.com/p/544200318 (you might need a google translate if you are truly interested)