DifferentiableUniverseInitiative / flowpm

Particle Mesh simulation in TensorFlow
https://flowpm.readthedocs.io/
MIT License
90 stars 20 forks source link

Use stateless_normal to ensure that `flowpm.utils.white_noise` is deterministic #95

Closed wendazhou closed 1 year ago

wendazhou commented 3 years ago

Due to complicated semantics of random seeds in tensorflow, flowpm.utils.white_noise was not actually deterministic as a function of the seed. This fixes that by making use of the tensorflow.random.stateless_normal API.