Support determistic randomness. by jesnie · Pull Request #2001 · GPflow/GPflow

Fixes: #1956

So, we add a seed = None parameter. We use tfp.random.sanitize_seed to transform this into a random state, in a backwards-compatible manner, and then we use tensorflow.random.stateless_* function to get randomness that only depends on our random state.

This affects our likelihoods and models. This will be a breaking change for anybody who implements custom models or likelihoods, but not for people who only call existing code.

I've also added a notebook explaining how this works.