question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibility with TensorFlow 2

See original GitHub issue

Current behaviour with TensorFlow 2:

Exception originated from within Sacred.
Traceback (most recent calls):
  File "/.../lib/python3.6/site-packages/sacred/randomness.py", line 34, in set_global_seed
    tf.set_random_seed(seed)
AttributeError: module 'tensorflow' has no attribute 'set_random_seed'

Cause:

tf.set_random_seed(seed) has changed to tf.random.set_seed(seed) in TensorFlow 2.

Configuration:

sacred==0.7.4
tensorflow==2.0.0-alpha0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dasarpaicommented, Jan 26, 2020

tf.random.set_seed(seed)

Thanks you so much. It worked for me.

2reactions
elbarocommented, Mar 26, 2019

Also requires to change

tf.summary.FileWriter -> tf.summary.SummaryWriter
tensorflow.summary.FileWriter -> tensorflow.summary.SummaryWriter
Read more comments on GitHub >

github_iconTop Results From Across the Web

TensorFlow version compatibility
TensorFlow 1.2 might support GraphDef versions 4 to 7. · TensorFlow 1.3 could add GraphDef version 8 and support versions 4 to 8....
Read more >
tensorflow2.0.0 compatibility with scipy · Issue #50517
tensorflow2.0.0 compatibility with scipy #50517 ... i'm using tensorflow 2.0.0 what version of scipy should i install ...
Read more >
TensorFlow 2.5.0 incompatibility with NumPy 1.21+? (2021 ...
Necessary context: I am running this on my local machine, in a Python 3.9.7-configured environment. My NumPy version is 1.21.2 and my TensorFlow...
Read more >
Step-by-step Guide to Install TensorFlow 2 | by Chitta Ranjan
Due to its ease-of-use, efficiency, and cross-compatibility TensorFlow 2.0 is going to change the landscape of Deep Learning. Here we will learn to...
Read more >
Tensorflow Plugin - Metal
2. Install base TensorFlow. python -m pip install tensorflow-macos ... the node was colocated with a group of nodes that required incompatible device....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found