Teaser Image
atomic14

TFRANDOMSHUFFLE

Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
  ·     ·     ·     ·     ·   Posts  ·   Videos  ·   Tags  ·   Support

TensorFlow has two random seeds

In this post, I reminded myself about some peculiarity with TensorFlow's tf.random.shuffle. I assumed that using the same seed for two shuffle operations would always output the same results but turns out, I was wrong! I discovered that I need to set the global seed with tf.random.set_seed() before every operation to get consistent results. Definitely a lesson learned to pay a bit more attention to TensorFlow's well written documentation about seeds usage for random operations.
04 September 2020
Subscribe!
All content copyright Chris Greening © 2023 • All rights reserved.
Made with Jekyll