Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'tensorflow' has no attribute 'set_random_seed' #3

Open
jayroxis opened this issue Jul 17, 2020 · 2 comments
Open

Comments

@jayroxis
Copy link

Awesome work!

I came across this error running your code:

Traceback (most recent call last):
  File "main.py", line 10, in <module>
    tf.set_random_seed(seed)
AttributeError: module 'tensorflow' has no attribute 'set_random_seed'

set_random_seed() is deprecated and it has been moved to tf.random.set_seed()
https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/random/set_seed

@wentixiaogege
Copy link

tf.random.set_seed()

@Ryoochii
Copy link

Ryoochii commented Mar 15, 2023

Hey. So I fixed like you guys show but now it still has an error:
tf.random.set_seed(1)

AttributeError: module 'tensorflow' has no attribute 'random'

Does anyone know what to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants