Pyro

Beneath the built-in inference algorithms, Pyro has a library of flexible primitives for creating new inference algorithms and working with probabilistic programs.