🌈 ESP32-S3 Rainbow: ZX Spectrum Emulator Board! Get it on Crowd Supply →
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 © 2025 • All rights reserved.
Made with Jekyll

This website uses cookies to enhance your browsing experience and analyze site traffic.